Search code examples
asp.netpublish

Unrecognized attribute 'targetFramework'. Note > that attribute names are case-sensitive


I try to publish a web application from my VS2012 to a remote computer. I published the files but when I try to open the website, I get this error:

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

Source Error:

Line 41: 
Line 42:     <compilation targetFramework="4.0" />
Line 43:     <httpRuntime targetFramework="4.0" />
Line 44:     <authentication mode="Forms">   
Line 45:       <forms loginUrl="~/" timeout="2880" />

(line 43 is in red )

On the remote computer : * IIS7 is installed (and also IIS6, I think) * ASP.NET 4.0 is installed * "aspnet_regiis -ir" > installed successfully * IIS7 > Application Pools > ASP.NET 4.0 > poining to ".NET Framework v4.0.30319" * IIS7 > my web application > "ASP.NET 4.0" (Integrated) is chosen. I don't know if it 's important but server's windows is Widows Server 2008 RT Enterprise 64-bit and my computer is windows 7 32-bit.

Nothing helped...

enter image description here enter image description here


Solution

  • The httpRuntime did not have targetFramework available for set, remove it and it will work.