Web.config causing "blocked by group policy" error

500 internal server error iis web config
configure web server windows 2008 r2
web.config show errors remote
iis 7 windows 2008
install iis 7.5 on windows server 2008
windows server 2008 r2 install iis 7
iis 7.5 download for windows server 2008 r2

The miriad of different web.config settings have always been a bit of a mystery to me. I'm glad Microsoft has cleaned up some of the content put there by default, but it's still causing problems.

Specifically, Visual Studio 2015 is placing the following section in the generated web.config of a standard ASP.NET MVC application.

    <compiler language="c#;cs;csharp" extension=".cs"
      type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=, 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=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
      warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>

When I upload this application on to my GoDaddy shared Plesk hosting account, I get the following error.

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

GoDaddy support is completely unwilling and unable to provide any assistance. However, I found that if I comment out the section above, the error goes away.

Does anyone know the purpose of this block or why Microsoft puts it there? My app seems to run okay without it. (Note that my app uses C# and not VB.)

Web.Config causes 500 internal server error, The problem was from the server, they have not installed Microsoft URL Rewriting Module correctly The module has been installed correctly,  Fixes an issue in which the ASP.NET/IIS applications may fail to load when web.config file of the application is overridden by using Configuration.Save(…) or Configuration.SaveAs(…) methods in the .NET Framework 4.7

   <!--remove all the contents here-->

Remove all the contents inside the system.codedom tag and add

<trust level="Full"/>

inside system.web tag

   <trust level="Full"/>

default web config file causing crash, (That is just one example of a line that causes it). <?xml version="1.0"?> <​configuration> <system.web>. <customErrors mode="Off" />. THANK YOU!!! I had the same problem and have done numerous searches this was my problem as well. Changing the premissions from AppPollIdentity to LoacalSystem worked.

I realize this is a little late but I solved this problem by deleting all of the content in the element. This seems to work for both pre-compiled and otherwise.

HOW TO: Troubleshoot ASP.NET Web Applications, You must start by identifying a request URL that causes the error The Web.​config file is located in the root directory of the application. Up until now I have only worked with this web.config within Visual Studio. However I am now trying to publish my website to IIS and there are errors associated with my web.config. It seems that it crashes on configuration data for a module.

On your server change Asp.net settings. There is a option for Trust Level. Set it to "Full".

Could you tell me what exactly happens when we edit the Web , NET changes would cause the AppDomain recycle, but with IIS7 and many of the settings living in web.config, this is a more common issue. i.e. changing a  Sample application below which on purpose sleeps for 20 seconds during application start, it works perfectly if I manually recycle application pool, no outage is observed but if I change web.config worker process is not terminated and hence no overlapped route is invoked and causing outage. web.config

web.config file causing 500 internal server error - asp.net - html, I have seen these articles, which details how to do it using the <clientCache /> element in web.config: Client Cache <clientCache> (IIS.NET) Add Expires or  web.config machine.config global.asax Anything in the bin directory or it's sub-directories; Updating the .aspx files, etc. causing a recompile will eventually trigger a restart of the application pool as well. There is a property of the compilation element under system.web that is called numRecompilesBeforeAppRestart. The default value is 20.

'Access is denied' on file 'c:\inetpub\wwwroot\web.config' causing 'An , 'Access is denied' on file 'c:\inetpub\wwwroot\web.config' causing 'An error occurred while trying to access server' when launching Controller  After the tests, I received a list of recommendations that I had to impart to make the web application more secure. In this article, I have listed all the changes I did only in the web config which has helped me make the site secure.

3.4 Upgrade IIS 8 updating web.config causes Internal 500 Er , I have the same problem after doing the auto upgrade to 3.4.0 and installing the new web.config file. After implementing the above solution  As you can see from the highlighted area the Reac Development Server should only be used when the environment is set to development and sure enough, the web.config has environment variable for ASPNETCORE_ENVIRONMENT and the value is Development as you can see in the following example.

  • @Aristos The aspx pages are compiled during compile time and placed in the bin folder. Since his section contains only .cs and .vb files and not .aspx files, his section does not apply. It might have been if the extension .aspx was mentioned in the section.
  • @Aristos if his .aspx files were also compiled using this section, his site wouldn't have worked without this code. (My app seems to run okay without it.)
  • You don't upload the codebehind pages to you hosting, you upload the binfolder and .aspx files.
  • @Aristos true, but not what the original poster asked.
  • My website was working in GoDaddy and I had not done that. I had to refresh everything and Prince Prasad's answer works.
  • Thank you so much. Your solution really came handy!