Unrecognized element 'providerOption'

1

I am deploying an ASP.NET MVC 4 application on IIS 7.5 on a Windows 2008 R2 machine.

The app works alright locally in the Visual Studio Web development server.

But when deployed, I get a 504 http status code.

The app runs in a custom application pool under the ApplicationPoolIdentity identity and in Integrated mode. The app pool is enabled to run both 32-bit and 64-bit applications and targets v4 of the .NET framework.

The app assemblies were build targeting "Any CPU".

When I deploy the application and attempt to access it, in addition to receiving the 504 Http status code, I also see this in the event viewer.

Event Data
  HRESULT 0x8007000d 
  PhysicalPath \\?\C:\Windows\Microsoft.NET\Framework\v4.0.30319\CONFIG\web.config 
  Type 3 
  Message Unrecognized element 'providerOption'  
  LineNumber 53 
  PreviousLine <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">  
  ErrorLine <providerOption name="CompilerVersion" value="v4.0"/>  
  NextLine <providerOption name="WarnAsError" value="false"/>  
asp.net
asp.net-mvc
asp.net-mvc-4
iis-7.5
windows-server-2008-r2
asked on Stack Overflow Jan 23, 2014 by Water Cooler v2

1 Answer

1

The above configuration pertains to CodeDOM, a set of classes in the System.CodeDom namespace in the System.dll assembly that ASP.NET uses to generate our "code behind" classes.

The CodeDOM configuration has changed from v2 of the .NET framework to v3.5.

I missed the part where the above error gives me the path of the web.config it is complaining about. The path is C:\Windows\Microsoft.NET\Framework\v4.0.30319\CONFIG\web.config and that file did have this <providerOption> element.

I commented that out. This error is now gone.

However, I still have other issues to deal with but this one goes away. So, anyone else in the future who faces this error might use this answer as help.

answered on Stack Overflow Jan 23, 2014 by Water Cooler v2

User contributions licensed under CC BY-SA 3.0