cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
estieg
Former Employee

Resolving Web Hosting Message: This Program Is Blocked - Tutorial

Mojosound  Writes, I am trying to teach myself some new skills in web development using Windows Server, Visual Studio, and angularjs/bootstrap.  I purchased the deluxe web hosting (Windows) and pointed my domain to it.  I have Visual Studio 2015 and created a new  ASP.Net project with MVC and Web API enabled.  I added angularjs to the project.  I changed a couple of the pages for content, built and tested locally.  All appears to work fine.  I published the project to a local folder and then used FTP to upload the files to the httpdocs folder of my site.  When navigating to the site I got an error.  I enabled verbose error messages and this is what I got below.  I have .NET version 4.6 set for the server.  The application was built against 4.6 as well.  This occurred after changing the web.config file to address an issue with trust.

<system.web>

<trust level="Full" />

</system.web>

 

Any thoughts?

 

This program is blocked by group policy. For more information, contact your system administrator

Server Error in '/' Application.

This program is blocked by group policy. For more information, contact your system administrator

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ComponentModel.Win32Exception: This program is blocked by group policy. For more information, contact your system administrator

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[Win32Exception (0x80004005): This program is blocked by group policy. For more information, contact your system administrator]

 

[ExternalException (0x80004005): Cannot execute a program. The command being executed was "G:\PleskVhosts\test.cjt-design.com\httpdocs\bin\roslyn\csc.exe" /shared /keepalive:"10" /noconfig  /fullpaths @"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\fbba4ee0\be997a0f\5mck0zsh.cmdline".]

   System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine) +6840403

   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) +81

   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) +24

   System.Web.Compilation.AssemblyBuilder.Compile() +948

   System.Web.Compilation.BuildProvidersCompiler.PerformBuild() +10082485

   System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +9977528

   System.Web.Compilation.BuildManager.CompileGlobalAsax() +44

   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +260

 

[HttpException (0x80004005): Cannot execute a program. The command being executed was "G:\PleskVhosts\test.cjt-design.com\httpdocs\bin\roslyn\csc.exe" /shared /keepalive:"10" /noconfig  /fullpaths @"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\fbba4ee0\be997a0f\5mck0zsh.cmdline".]

   System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +62

   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +435

   System.Web.Compilation.BuildManager.CallAppInitializeMethod() +33

   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +545

 

[HttpException (0x80004005): Cannot execute a program. The command being executed was "G:\PleskVhosts\test.cjt-design.com\httpdocs\bin\roslyn\csc.exe" /shared /keepalive:"10" /noconfig  /fullpaths @"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\fbba4ee0\be997a0f\5mck0zsh.cmdline".]

   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9946132

   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +90

   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +261

 

 

MojoSound goes on to suggest the following resolved the issue:

 

These things need to happen:

 

  1. Web.config needs to be changed so that <trust level="Full" /> is added in the system.web section.
  2.  Web.config needs to be changed so that the compilers are removed.  The system.codedom needs to be empty.  <system.codedom /> <!-- No compiling on server, GoDaddy blocks it. -->
  3.  The settings in Visual Studio for publishing the website need to be changed to enable precompiling the website.

 

The root cause of the issue is that GoDaddy does not allow compiling of the website on the server.  This was the permission issue observed above.  Once these were done the site came up fine.

 

 

Additionally, this information may be helpful:

Solution from: http://stackoverflow.com/a/38668274

If I answered your question, please mark it as the solution or give it a "Kudo"