Security IIS无法启动:错误BC2000

Security IIS无法启动:错误BC2000,security,iis-7.5,Security,Iis 7.5,当我尝试在IIS 7.5上启动ASP.net站点时,出现以下错误 BC2000: compiler initialization failed unexpectedly: 0x80070005 四处搜索,我找到了一个可能的解决方案:转到C:\Windows\Temp文件夹的安全设置,并向用户“网络服务”和IIS\U IUSR添加完全控制权限 但我做到了,错误还在继续 在我的计算机中%temp%指向C:\Users\sp\AppData\Local\temp,它们也具有这些权限 我还尝试使用实用

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

BC2000: compiler initialization failed unexpectedly: 0x80070005
四处搜索,我找到了一个可能的解决方案:转到C:\Windows\Temp文件夹的安全设置,并向用户“网络服务”和IIS\U IUSR添加完全控制权限

但我做到了,错误还在继续

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

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

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

因此,我所做的工作是将应用程序池的用户更改为计算机管理员(IIS管理器>应用程序池>高级设置>标识)。但这似乎不太安全


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

授予用户“网络服务”对文件夹C:\Windows\Temp的完全访问权限请尝试以下步骤-

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

  • 在上为网络服务IIS_IUSR授予完全访问权限

  • C:\Windows\Temp\

  • 在上为网络服务IIS_IUSR授予完全访问权限
  • C:\Windows\Microsoft.NET\Framework\v2.0.50727\ASP.NET临时文件\


    我最终解决了这个问题,允许对%TEMP%文件夹中的所有人进行完全控制
    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)