Unrecognized attribute 'targetFramework'. Please note that attribute names are case sensitive.

I just uploaded the website to my server. And it works fine in place, but after I downloaded, the online version displays this:

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 37: </buildProviders>
Line 38: </compilation>
Line 39: <httpRuntime targetFramework = "4.0"
encoderType = "System.Web.Security.AntiXss.AntiXssEncoder, System.Web,
Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a "/>
Line 40: <machineKey compatibilityMode = "Framework45" />
Line 41: </system.web>


 Source File: D: \ HostingSpaces \ o \ o.com.au \ wwwroot \ web.config Line:
39 


-------------------------------------------------- ------------------------------
Version Information: Microsoft .NET Framework Version: 4.0.30319;
ASP.NET Version: 4.0.30319.272

According to other answers on this site, since the server account is configured to use the .NET Framework 2.0. BUT what is wrong with mine, I made sure that it is installed in 4.0, and I even tried 4.0 Integrated. But it still displays this error.

What could be the reason for this? How can i fix this?

enter image description here

+5
4

, ASP.NET 4.5 (., , <httpRuntime> <machineKey>), ASP.NET 4.0. <httpRuntime> <machineKey> Web.config, .

( : <httpRuntime/targetFramework> 4.5. "4.0", , .)

+17

, IIS, 4.0 (Integrated) (, ). , HttpRunTime/targetFrameWork > 4.5. . , HttpRuntime V2 Doc. TargetFrameWork 4.

OP , .NET- 4, 2.0 . , (), .NET 2.0 , web.config.

+6

, IIS , apllication ASP.NET v4.0.

,

+1

ASP.NET 4 . , - . DFS . , . , , . , , , NET Framework , .

0

All Articles