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

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


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

说明: 执行当前 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. playframework 一步一步来 之 日志 (三)

    在paly中自定义配置logback,也很简单,只需在conf folder下添一个application-logger.xml或者logger.xml就行了.(出处:"If you cre ...

  2. IDEA 错误: 找不到符号

    在IDEA添加了一个新的Mapper.xml文件,然后删除,重新编译该文件所在的模块时,提示我编写的类找不到符合. 解决方法:右键.java文件,选择“complile ....”(ctrl+shif ...

  3. ArrayList增加扩容问题 源码分析

    public class ArrayList<E>{ private static final int DEFAULT_CAPACITY = 10;//默认的容量是10 private s ...

  4. SCUCTF2018web部分wp

    [签到] Web部分的签到题,打开连接后F12审查元素 可以看到有被隐藏起来的JSFuck密码,解码运行后可得flag [计算器] 打开后界面如上图,要求简单来说就是回答20道数学题目,每道题最多3s ...

  5. kettle连接oracle报错oracle.i18n.text.converter.CharacterConverter.OGS.getInstance(I)Loracle/i18n/text/converter/CharacterConverter

    问题背景1:需要将一张excel中的数据导入到数据库中,并且还有关联转换和去重的处理问题,且此excel表不是固定的,需要写一个脚本 当新的excel拿来的时候,可以直接导入即可.所以我想用kettl ...

  6. jquery 3.4.0

    jQuery 3.4.0 的更新内容主要是错误修复和功能改进,列举部分如下: 针对 .width 和 .height 的性能改进 支持 nonce 和 nomodule 针对 Radio 元素新增事件 ...

  7. template模板的使用方法

    模板 WXML提供模板(template),可以在模板中定义代码片段,然后在不同的地方调用. 定义模板 使用name属性,作为模板的名字.然后在<template/>内定义代码片段 使用模 ...

  8. Android手机app的adb命令测试电量

    Android手机app电量测试 Android 5.0及以上的设备, 允许我们通过adb命令dump出电量使用统计信息 第一步:手机安装要测试的应用,打开手机开发者模式-USB模式,运行cmd.ex ...

  9. macOS终端开启TAB键自动补全功能(不区分大小写)

    1.在当前用户根目录(~)下,修改~/.inputrc这个文件(如果文件不存在,则新建该文件),文件内容如下: set show-all-if-ambiguous on set completion- ...

  10. windows10的环境变量path如何列表显示

    如果你的变量值以%开头,打开编辑的时候就会显示一串的变量值,不方便查找编辑 所以将变量值更改为以盘符开始,就可以解决这个问题,比如:D:\WorkSoft\app\product\11.2.0\dbh ...