我尝试通过 Godaddy 中的计划任务执行 .exe
文件,但运行此任务时出现错误
"This program is blocked by group policy".
应用程序是一个 C# 控制台应用程序。
最佳答案
在 web.config 中,注释掉 <system.codedom>
内的所有内容。 GoDaddy 阻止了它。
<!--<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+"/>
</compilers>-->
关于plesk - 该程序被组策略阻止。在 Godaddy Windows 托管中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45567745/