【问题标题】:IIS failing to start: Error BC2000IIS 无法启动:错误 BC2000
【发布时间】:2012-04-25 08:44:03
【问题描述】:

当我尝试在 IIS 7.5 上启动 ASP.net 站点时,我收到以下错误

BC2000: compiler initialization failed unexpectedly: 0x80070005

四处搜索我找到了一个可能的解决方案:转到 C:\Windows\Temp 文件夹的安全设置,并为用户“NETWORK SERVICE”和 IIS_IUSRS 添加完全控制权限。

但我这样做了,错误还在继续。

在我的机器中 %temp% 指向 C:\Users\sp\AppData\Local\Temp ,它也具有这些权限。

我还尝试使用实用程序“aspnet_regiis”重新安装 ASP。

这是完整的事件日志条目(应用程序警告 1310):

Event code: 3007 
Event message: A compilation error has occurred. 
Event ID: 733bee25fcbe4f0ab74b7fc56ce833d7 
Event sequence: 3 
Event occurrence: 1 
Event detail code: 0 

Application information: 
    Application domain: /LM/W3SVC/5/ROOT-1-129798160562503533 
    Trust level: Full 
    Application Virtual Path: / 

Process information: 
    Process ID: 8040 
    Process name: w3wp.exe 
    Account name: IIS APPPOOL\myapp 

Exception information: 
    Exception type: HttpCompileException 
    Exception message: vbc : Fatal (0): error BC2000: compiler initialization failed unexpectedly: 0x80070005 

Request information: 
    User host address: ::1 
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: sp-PC\sp 

Thread information: 
    Thread ID: 8 
    Thread account name: sp-PC\sp 
    Is impersonating: False 
    Stack trace:    at System.Web.Compilation.AssemblyBuilder.Compile()
   at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
   at System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed)
   at System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories)
   at System.Web.Compilation.BuildManager.CompileCodeDirectories()
   at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
   at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters)

所以我所做的工作是将应用程序池的用户更改为机器管理员(IIS 管理器 > 应用程序池 > 高级设置 > 身份)。但这似乎不太安全。

所以我的问题是:为什么它不能使用“内置帐户”(我尝试了 ApplicationPoolIdentity 和 NetworkService)。

【问题讨论】:

    标签: security iis-7.5


    【解决方案1】:

    试试下面的步骤-

    1. 如果您在 x64 机器上运行,请为默认应用程序池设置“启用 32 位应用程序”。

    2. 上授予 NETWORK SERVICEIIS_IUSRS 的完全访问权限

    C:\Windows\Temp\

    1. 上授予 NETWORK SERVICEIIS_IUSRS 的完全访问权限

    C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\

    【讨论】:

      【解决方案2】:

      授予用户“网络服务”对文件夹 C:\Windows\Temp 的完全访问权限

      【讨论】:

      • 我终于通过允许 %TEMP% 文件夹中的所有人完全控制来解决这个问题
      猜你喜欢
      • 2017-09-03
      • 1970-01-01
      • 2015-09-09
      • 2019-04-17
      • 1970-01-01
      • 2012-07-26
      • 2021-08-06
      • 2020-04-06
      • 1970-01-01
      相关资源
      最近更新 更多