我试图跟随入门OpenRasta应用程序.
https://github.com/openrasta/openrasta-stable/wiki/Building-Your-First-OpenRasta-Website
我在Windows 7 64位下使用.Net4,我的目标是IIS 7.5.我已将Active Configuration设置为Debug,将我的Platform设置为Any CPU.我使用的OpenRasta版本是2.0.3.
这是我得到的错误:“无法加载文件或程序集’OpenRasta.Hosting.AspNet’或其依赖项之一.系统无法找到指定的文件.”
我怀疑它与.net35而不是4编译的OpenRasta有关?
我已经尝试了许多不同的方法来解决这个问题,但我仍然陷入困境.
我更改了应用程序池设置以设置启用32位Applications = true,这是我正在使用的web.config:
<?xml version="1.0"?> <configuration> <system.diagnostics> <switches> <add name="ShowErrors" value="4"/> </switches> <!-- log to debug output --> <sources> <source name="OpenRasta" switchValue="All"> <listeners> <add name="TextWriterListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="Logs\OpenRasta.txt"/> </listeners> </source> </sources> </system.diagnostics> <system.web> <compilation debug="true" targetFramework="4.0"> </compilation> <authentication mode="None"/> <!-- required for WebForms views --> <pages pageParserFilterType="OpenRasta.Codecs.WebForms.OpenRastaPageParserFilter,OpenRasta.Codecs.WebForms,Version=2.0.1.0,Culture=neutral" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"> <namespaces> <add namespace="OpenRasta.Web"/> <add namespace="OpenRasta.Web.Markup"/> <add namespace="OpenRasta.Codecs.WebForms"/> <add namespace="OpenRasta"/> <add namespace="System.Collections.Generic"/> </namespaces> </pages> <!-- hook into OpenRasta --> <httpHandlers> <add verb="*" path="*.rastahook" type="OpenRasta.Hosting.AspNet.OpenRastaHandler,OpenRasta.Hosting.AspNet,Culture=neutral"/> </httpHandlers> <httpModules> <add name="RastaModule" type="OpenRasta.Hosting.AspNet.OpenRastaModule,Culture=neutral"/> </httpModules> </system.web> <system.codedom> <compilers> <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider,System,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089" compilerOptions="/warnaserror-"> <providerOption name="CompilerVersion" value="v4.0"/> <providerOption name="WarnAsError" value="false"/> </compiler> </compilers> </system.codedom> <!-- iis7 config --> <system.webServer> <validation validateIntegratedModeConfiguration="false"/> <!-- hook into OpenRasta --> <modules> <add name="OpenRastaModule" type="OpenRasta.Hosting.AspNet.OpenRastaModule,OpenRasta.Hosting.AspNet"/> </modules> <handlers> <add name="OpenRastaHandler" verb="*" path="*.rastahook" type="OpenRasta.Hosting.AspNet.OpenRastaHandler,Culture=neutral"/> </handlers> </system.webServer> </configuration>
任何帮助将不胜感激!也许有一个.net 4版本的openrasta在那里,我找不到?
解决方法
32位或64位对此没有影响.您是否已向相关程序集添加项目引用?