我正在开发一个 MVC 2 应用程序。我将 MVC 2 应用程序部署到 IIS 7,但它不起作用。这是第一次部署 MVC 应用程序。我相信我配置得很好,但是得到空白页。
有人可以建议配置可能有什么问题吗?我检查了错误日志并收到以下错误消息:
Event code: 3008
Event message: A configuration error has occurred.
Event time: 7/24/2013 1:23:10 PM
Event time (UTC): 7/24/2013 5:23:10 PM
Event ID: b5b4917c2d644626aa06e90e9d31cbca
Event sequence: 1
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/3/ROOT-1-130191601896341853
Trust level: Full
Application Virtual Path: /
Application Path: C:\Yahrzeit\
Machine name: YUIAEVT2K802
Process information:
Process ID: 3984
Process name: w3wp.exe
Account name: IIS APPPOOL\Yahrzeit
Exception information:
Exception type: ConfigurationErrorsException
Exception message: Could not load file or assembly 'MvcYahrzeit' or one of its dependencies. An attempt was made to load a program with an incorrect format.
at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)
at System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()
at System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai)
at System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig)
at System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies()
at System.Web.Compilation.BuildManager.CallPreStartInitMethods()
at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
Could not load file or assembly 'MvcYahrzeit' or one of its dependencies. An attempt was made to load a program with an incorrect format.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)
部署服务器是 64 位的。