IIS无法启动:错误BC2000

时间:2012-04-25 08:44:04

标签: security iis-7.5

当我尝试在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管理器>应用程序池>高级设置>标识)。但这似乎不太安全。

所以我的问题是:为什么它不能和#34;内置帐户" (我尝试过ApplicationPoolIdentity和NetworkService)。

2 个答案:

答案 0 :(得分:1)

尝试以下步骤 -

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

  2. 授予对网络服务 IIS_IUSRS 的完全访问

  3.   

    C:\ WINDOWS \ TEMP \

    1. 授予对网络服务 IIS_IUSRS 的完全访问权
    2.   

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

答案 1 :(得分:0)

授予用户“网络服务”对文件夹C:\ Windows \ Temp

的完全访问权限