今天更新系统上传到阿里云服务器,报错如下:

“/”应用程序中的服务器错误。


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

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

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

源错误:

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

堆栈跟踪:

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

[ExternalException (0x80004005): 无法执行程序。所执行的命令为 "f:\usr\LocalUser\qxw2309550136\bin\roslyn\csc.exe" /shared /keepalive:"10" /noconfig  /fullpaths @"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\8726d835\c1ae0133\lx3hbi43.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) +193
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\qxw2309550136\bin\roslyn\csc.exe" /shared /keepalive:"10" /noconfig /fullpaths @"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\8726d835\c1ae0133\lx3hbi43.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\qxw2309550136\bin\roslyn\csc.exe" /shared /keepalive:"10" /noconfig /fullpaths @"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\8726d835\c1ae0133\lx3hbi43.cmdline"。]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9952212
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.34280

这个错误在本地测试是没有的。

我所使用的开发工具是vs2015。

当我发布到阿里云虚拟主机时报的错。

经过百度没有找到解决方案,又用bing终于在stackoverflow上找到了解决方案。解决方案如下:

  1. Open NuGet Package Manager window
  2. uninstall Microsoft.CodeDom.Providers.DotNetCompilerPlatform package and rebuild & republish. (This uninstallation also removes CodeDom configuration from web.config file.)

意思就是打开nuget,然后卸载Microsoft.CodeDom.Providers.DotNetCompilerPlatform 包,重新编译发布。

详细参考:https://stackoverflow.com/questions/35184429/problems-publishing-a-website-on-smarterasp-net-with-csc-exe-file-included/35207055#35207055

我是通过这种方式解决的。

ExternalException (0x80004005): 无法执行程序的更多相关文章

  1. 【排除解决】System.Runtime.InteropServices.ExternalException (0x80004005): GDI+ 中发生一般性错误

    前言: 今天项目发布上线,发布到正式环境验证功能的时候忽然方向之前做的一个图片合成的功能报错了提示:System.Runtime.InteropServices.ExternalException ( ...

  2. “ExternalException (0x80004005): GDI+ 中发生一般性错误”的问题 .

     原因一般是写入文件时,.net没有该目录的写入权限. 解决方案:增加iis(对aspx而言)对该目录的写入权限.

  3. ExternalException (0x80004005): GDI+ 中发生一般性错误

    .net开发的程序用了一个自绘的框架, 平常部署到IIS上都没有问题,今天突然之间这个功能就运行不起来了. 报错:GDI+错误,然后在本地的VS里面运行是没有问题的 百度出来的改Path环境变量.注册 ...

  4. GDI+ 中发生一般性错误。

    GDI+ 中发生一般性错误. “/wechat”应用程序中的服务器错误. GDI+ 中发生一般性错误. 说明: 执行当前 Web 请求期间,出现未经处理的异常.请检查堆栈跟踪信息,以了解有关该错误以及 ...

  5. vs开发/IIS 遇到的问题--------笔记

    1.VS2017专业版和企业版激活密钥 Enterprise: NJVYC-BMHX2-G77MM-4XJMR-6Q8QF Professional: KBJFW-NXHK6-W4WJM-CRMQB- ...

  6. IIS提示“异常详细信息: System.Runtime.InteropServices.ExternalException: 无法执行程序”

    先来看错误提示: 无法执行程序.所执行的命令为 "C:/Windows/Microsoft.NET/Framework/v3.5/csc.exe" /noconfig /fullp ...

  7. xp搭建IIS出现HTTP 500错误-2147467259 (0x80004005)

    安装IIS后访问localhost页面, 提示The remote procedure call failed and did not execute,再刷新变为:-2147467259 (0x800 ...

  8. xp_sendmail: 由于邮件错误 0x80004005 而失败

    今天收到一封邮件说我们的一台SQL SERVER 2000服务器发送邮件有问题.我测试中发现了如下错误: exec xp_sendmail 'Konglb@esquel.com','hello, 12 ...

  9. IE报错:模块"scrrun.dll"已加载,但对DllRegisterServer的调用失败,错误代码为0x80004005

    在我的win10系统上打开某内部网页登录的时候弹出'模块"scrrun.dll"已加载,但对DllRegisterServer的调用失败,错误代码为0x80004005'报错信息, ...

随机推荐

  1. flag:用心学习的第一天

    目标是:加油学习,尽早改变世界

  2. Java————迷宫问题

    它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线. package algorithm_java; import java. ...

  3. oracle 中如何查看某个表所涉及的存储过程

    SELECT DISTINCT * FROM user_source WHERE TYPE = 'PROCEDURE' AND upper(text) LIKE '%PS_KL_ABS_002_DAT ...

  4. JPA学习-03

    一.单向一对多 特点:性能差,不怎么用,有集合默认懒加载 @OneToMany 1.private Set<T> t = new HashSet<>() 2.private L ...

  5. MySQL PROFILE 跟踪语句各阶段性能开销

    PROFILE  可以跟踪查询语句各个阶段 Time,IO,CPU,MEMORY 等资源使用情况,比较详细.所以系统一般不会记录太多.启用是全局的,所以每个连接都保持语句的资源使用情况. 查看 PRO ...

  6. Nginx服务器中配置非80端口的端口转发方法详解

    这篇文章主要介绍了Nginx服务器中配置非80端口的端口转发方法详解,文中使用到了Nginx中的proxy_pass配置项,需要的朋友可以参考下 nginx可以很方便的配置成反向代理服务器: 1 2 ...

  7. LOJ-10104(割点+dfs)

    题目链接:传送门 思路: 求割点的同时求割点删除后所剩的不连通的点的对数,在遍历完成后回溯统计点的个数,具体操作见代码: 注意:结果是long long 类型. #include<iostrea ...

  8. C#项目学习记录

    1,   Visual Studio Code 添加VS 2017的开发人员命令提示符---C#编译环境 2,  C#编译器和CLI的安装 注意:自己的电脑上配置环境变量时,配置在系统变量的Path中 ...

  9. Python开发——11.异常及异常处理

    一.异常 1.定义 异常及时程序运行时发生错误的信号 2.种类 异常分为语法错误和逻辑错误,语法错误在程序执行之前就应该改正. 常用异常 AttributeError 试图访问一个对象没有的树形,比如 ...

  10. CentOS开启telnet服务

    原文地址:https://blog.csdn.net/zhujiangm/article/details/4540778 服务器:CentOS-5.1(192.168.1.87)客户机:FC6(192 ...