ASP.NET 因为无法创建应用程序域,因此未能执行请求。错误号:0x80070002

本文详细介绍了Windows Server 2003部署的ASP.NET程序在更新补丁后出现无法创建应用程序域导致无法运行的问题,并提供了通过重新注册IIS、检查.NET Framework 2.0权限、确保虚拟目录访问权限等解决方案,最终发现是KB2604092补丁引起问题,卸载后恢复正常。

有一台服务器windows server 2003,部署了一个asp.net 程序,一直运行正常,打过一堆补丁之后,突然就运行不起来了,通过事件查看器发现错误:因为无法创建应用程序域,因此未能执行请求。错误号:0x80070002。

网上查询解决方案:

    1. 重新注册IIS, NET/Framework/v2.0.50727里的aspnet_regiis.exe 运行它,重新注册一下

        先卸载:.net aspnet_regiis.exe -u

        重新安装:aspnet_regiis.exe -i

    2. 安装2.0之后,查看IIS的虚拟目录的属性设置中的ASP.NET标签是否为2.0。

    3. 权限问题:

        (1). 检查应用程序池的属性,查看它是以什么用户身份运行的,一般是NETWORK   SERVICE

        (2). 确保这个用户对.NET   Framework   2.0的目录有访问权限:systemroot:/Windows/Microsoft.NET/Frameworks/2.0.xxxx

        (3). 确保该用户对虚拟目录具有访问权限。

尝试过之后问题依旧,后来发现有人说是KB2604092这个补丁引起的,卸载之后重启服务器,恢复正常。
“/”应用程序中的服务器错误未能加载文件或程序集“file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\33729d14\11b34175\App_Code.k39lleca.dll”或它的某一个依赖项。系统找不到指定的文件。 说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.IO.FileNotFoundException: 未能加载文件或程序集“file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\33729d14\11b34175\App_Code.k39lleca.dll”或它的某一个依赖项。系统找不到指定的文件。 源错误: 执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 程序集加载跟踪: 下列信息有助于确定程序集“file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\33729d14\11b34175\App_Code.k39lleca.dll”未能加载的原因。 警告: 程序集绑定日志记录被关闭。 要启用程序集绑定失败日志记录,请将注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD)设置为 1。 注意: 会有一些与程序集绑定失败日志记录关联的性能损失。 要关闭此功能,请移除注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog]。 堆栈跟踪: [FileNotFoundException: 未能加载文件或程序集“file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\33729d14\11b34175\App_Code.k39lleca.dll”或它的某一个依赖项。系统找不到指定的文件。] System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0 System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +36 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +152 System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence assemblySecurity) +34 System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly() +98 System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +9989472 System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +125 System.Web.Compilation.BuildManager.CompileCodeDirectories() +383 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +243 [HttpException (0x80004005): 未能加载文件或程序集“file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\33729d14\11b34175\App_Code.k39lleca.dll”或它的某一个依赖项。系统找不到指定的文件。] System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +62 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +435 System.Web.Compilation.BuildManager.CallAppInitializeMethod() +33 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +563 [HttpException (0x80004005): 未能加载文件或程序集“file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\33729d14\11b34175\App_Code.k39lleca.dll”或它的某一个依赖项。系统找不到指定的文件。] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10075596 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +95 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254 版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.7.3062.0怎么解决
最新发布
09-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值