Win32Exception (0x80004005): 组策略阻止了这个程序。要获取详细信息,请与系统管理员联系。

用阿里云上传代码后,访问网站,出现如下错误:

----------错误界面的信息---------------
“/”应用程序中的服务器错误。
组策略阻止了这个程序。要获取详细信息,请与系统管理员联系。
说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.ComponentModel.Win32Exception: 组策略阻止了这个程序。要获取详细信息,请与系统管理员联系。

源错误:

执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪:

[Win32Exception (0x80004005): 组策略阻止了这个程序。要获取详细信息,请与系统管理员联系。]

[ExternalException (0x80004005): 无法执行程序。所执行的命令为 “f:\usr\LocalUser\bxw23*******\bin\roslyn\csc.exe” /shared /keepalive:“10” /noconfig /fullpaths @“C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\63cb5cf8\b0070fdf\4auhg5zi.cmdline”。]
System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine) +6487183
System.CodeDom.Compiler.Executor.ExecWaitWithCapture(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine) +115
System.CodeDom.Compiler.Executor.ExecWaitWithCapture(IntPtr userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName) +59
Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.Compile(CompilerParameters options, String compilerFullPath, String arguments, String& outputFile, Int32& nativeReturnValue) +270
Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.FromFileBatch(CompilerParameters options, String[] fileNames) +680
Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.CompileAssemblyFromFileBatch(CompilerParameters options, String[] fileNames) +186
System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile(CompilerParameters options, String[] fileNames) +23
System.Web.Compilation.AssemblyBuilder.Compile() +884
System.Web.Compilation.BuildProvidersCompiler.PerformBuild() +9520058
System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +9950660
System.Web.Compilation.BuildManager.CompileGlobalAsax() +44
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +269

[HttpException (0x80004005): 无法执行程序。所执行的命令为 “f:\usr\LocalUser\bxw23*******\bin\roslyn\csc.exe” /shared /keepalive:“10” /noconfig /fullpaths @“C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\63cb5cf8\b0070fdf\4auhg5zi.cmdline”。]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +62
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +427
System.Web.Compilation.BuildManager.CallAppInitializeMethod() +31
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +535

[HttpException (0x80004005): 无法执行程序。所执行的命令为 “f:\usr\LocalUser\bxw23*****\bin\roslyn\csc.exe” /shared /keepalive:“10” /noconfig /fullpaths @“C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\63cb5cf8\b0070fdf\4auhg5zi.cmdline”。]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9952212
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +456

版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.34280
----------错误界面的信息---------------

错误截图
截图

晚上搜索信息找到解决方案:
打开nuget,然后卸载Microsoft.CodeDom.Providers.DotNetCompilerPlatform 包,重新编译发布

具体操作如下:
在这里插入图片描述
在这里插入图片描述
参考资料:参考资料

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值