在iis中设置应用程序时出现异常 [英] exception while setting application in iis

查看:117
本文介绍了在iis中设置应用程序时出现异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误是


''/''应用程序中的服务器错误.
-------------------------------------------------- ------------------------------

无法加载文件或程序集"SCMWeb"或其依赖项之一.该程序集由比当前加载的运行时新的运行时构建,无法加载.
说明:执行当前Web请求期间发生未处理的异常.请查看堆栈跟踪,以获取有关错误及其在代码中起源的更多信息.

异常详细信息:System.BadImageFormatException:无法加载文件或程序集"SCMWeb"或其依赖项之一.该程序集由比当前加载的运行时新的运行时构建,无法加载.

源错误:

当前Web请求的执行期间生成了未处理的异常.可以使用下面的异常堆栈跟踪来标识有关异常的来源和位置的信息.

程序集加载跟踪:以下信息有助于确定为什么无法加载程序集"SCMWeb".


WRN:程序集绑定日志记录已关闭.
若要启用程序集绑定失败日志记录,请将注册表值[HKLM \ Software \ Microsoft \ Fusion!EnableLog](DWORD)设置为1.
注意:与程序集绑定失败日志记录相关的性能损失.
要关闭此功能,请删除注册表值[HKLM \ Software \ Microsoft \ Fusion!EnableLog].



堆栈跟踪:


[BadImageFormatException:无法加载文件或程序集"SCMWeb"或其依赖项之一.此程序集是由比当前加载的运行时新的运行时构建的,无法加载.]
System.Reflection.Assembly._nLoad(AssemblyName文件名,字符串codeBase,证据assemblySecurity,程序集locationHint,StackCrawlMark&stackMark,布尔throwOnFileNotFound,布尔forIntrospection)+0
System.Reflection.Assembly.nLoad(AssemblyName文件名,字符串codeBase,证据assemblySecurity,程序集locationHint,StackCrawlMark&stackMark,布尔throwOnFileNotFound,布尔forIntrospection)+43
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,证据assemblySecurity,StackCrawlMark和stackMark,布尔值用于自省)+127
System.Reflection.Assembly.InternalLoad(字符串assemblyString,证据assemblySecurity,StackCrawlMark&stackMark,用于自省的布尔值)+142
System.Reflection.Assembly.Load(String assemblyString)+28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(字符串assemblyName,布尔型starDirective)+46

[ConfigurationErrorsException:无法加载文件或程序集"SCMWeb"或其依赖项之一.该程序集由比当前加载的运行时新的运行时构建,无法加载.]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(字符串assemblyName,布尔型starDirective)+613
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()+203
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai)+105
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig)+178
System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir)+163
System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir,Boolean ignoreErrors)+53
System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir,VirtualPath virtualDir,布尔ignoreErrors)+175
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)+83
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath,布尔值noBuild,布尔值allowCrossApp,布尔值allowBuildInPrecompile)+261
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext上下文,VirtualPath virtualPath,布尔值noBuild,布尔值allowCrossApp,布尔值allowBuildInPrecompile)+101
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath,HttpContext上下文,布尔allowCrossApp,布尔noAssert)+126
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath虚拟路径,类型requiredBaseType,HttpContext上下文,布尔值allowCrossApp,布尔值noAssert)+62
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext上下文,字符串requestType,VirtualPath虚拟路径,字符串物理路径)+33
System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext上下文,字符串requestType,VirtualPath virtualPath,字符串physicalPath)+40
System.Web.HttpApplication.MapHttpHandler(HttpContext上下文,字符串requestType,VirtualPath路径,String pathTranslated,布尔useAppConfig)+160
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()+93
System.Web.HttpApplication.ExecuteStep(IExecutionStep步骤,布尔值并已完成同步)+155




-------------------------------------------------- ------------------------------
版本信息:Microsoft .NET Framework版本:2.0.50727.3053; ASP.NET版本:2.0.50727.3053




..........
但是应用程序正在正确调试,没有任何错误,这是一个Web应用程序..
我只是将其从Visual Studio 2008转换为2010 ..而我被困在这里
请为此

Error is


Server Error in ''/'' Application.
--------------------------------------------------------------------------------

Could not load file or assembly ''SCMWeb'' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.BadImageFormatException: Could not load file or assembly ''SCMWeb'' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly ''SCMWeb'' could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



Stack Trace:


[BadImageFormatException: Could not load file or assembly ''SCMWeb'' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46

[ConfigurationErrorsException: Could not load file or assembly ''SCMWeb'' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +163
System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +53
System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +175
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +83
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +261
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +101
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +126
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +62
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +33
System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +160
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +93
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053




..........
but application is being debug properly without any error and this is a web application..
I just converted it from visual studio 2008 to 2010..and i got stuck here
kindly help on this

推荐答案

尝试提供帮助,方法是为应用程序池指定适当的运行时-如
Try by specifying the appropriate runtime for the application pool - as described here[^].


这篇关于在iis中设置应用程序时出现异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆