How yo fix 'This program is blocked by group policy'

By FoxLearn 2/18/2024 1:09:46 AM   69
This post shows you how to solve the problem 'This program is blocked by group policy. For more information, contact your system administrator' in ASP.NET MVC.

As you know, some web hosting companies like GoDaddy prevent you to compile your website in their servers, may be related to security issues.

To solve the problem, you need to open your web.config, just simple remove or add a comment to the <system.codedom> tag

<configuration>  
  <!--<system.codedom>  
    <compilers>
      <compiler   
        language="c#;cs;csharp"  
        extension=".cs"  
        type="Microsoft.CSharp.CSharpCodeProvider, System,   
          Version=1.0.5000.0, Culture=neutral,   
          PublicKeyToken=b77a5c561934e089"  
        compilerOptions=""  
        warningLevel="1" />  
    </compilers>  
  </system.codedom>-->
</configuration>

The <system.codedom> element contains compiler configuration settings for language providers installed on a computer other than the default providers installed with the .NET Framework, such as CSharpCodeProvider and VBCodeProvider.