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

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


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

说明: 执行当前 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. n2n网络环境搭建

    目的:   实现家中nas,在任何环境ssh访问 方案:n2n v1 (原因稳定&兼容macbook) 开源地址: https://svn.ntop.org/svn/ntop/trunk/n2 ...

  2. JSP·随笔

    1.简介 > HTML          - HTML擅长显示一个静态的网页,但是不能调用Java程序.       > Servlet   - Servlet擅长调用Java程序和后台进 ...

  3. 《Linux就该这么学》第十七天课程

    想学Squid可以前往https://www.linuxprobe.com/chapter-16.html讲的非常细 Squid服务程序提供正向代理服务 Squid服务程序提供的反向代理模式

  4. kvm+webvirtmgr在centos7上的部署

    #!/bin/bash #+++++++++++++++++++++++++++++++++++++++++++++++++++++++安装配置kvm并创建虚拟机+++++++++++++++++++ ...

  5. PE文件常用结构体

    Dos头结构: typedef struct _IMAGE_DOS_HEADER { // DOS .EXE header WORD e_magic; // Magic number WORD e_c ...

  6. 走进JDK(十二)------TreeMap

    一.类定义 TreeMap的类结构: public class TreeMap<K,V> extends AbstractMap<K,V> implements Navigab ...

  7. docker之tomcat简单部署

    将apache-tomcat-8.0.36.tar.gz及jdk-7u79-linux-x64.gz拷贝到创建的tomcat8目录下 在tomcat8目录下创建Dockerfile文件 在Docker ...

  8. ADO SQL手写分页

    //实现层 ---------------------------------------------------------分割线---------------------------------- ...

  9. metasploit生成payload的格式

    转自https://www.cnblogs.com/zlgxzswjy/p/6881904.html Often one of the most useful (and to the beginner ...

  10. pyspider爬取tourism management 所有文章的标题 作者 摘要 关键词等等所有你想要的信息

    #!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # C ...