Asp.net web-config error

I still have a problem with the asp.net project. In Visual Studio, when I start debugging, everything works fine on the page, but when I try to show this error on iis7.

SHOW THE ERROR:

Configuration Error Description: An error occurred while processing the configuration file needed to service this request. Review the specific error data below and modify your configuration file accordingly.

Parser error message: unrecognized attribute 'targetframework'. Note that attribute names are case sensitive.

Source Error:

Line 18:     </connectionStrings> 
Line 19:     <system.web> 
Line 20:       <compilation debug="true" targetframework="4.0" /> 
Line 21:     </system.web> Line 22: 

Source file: C: \ inetpub \ wwwroot \ web.config Line: 20

There seems to be a problem with targetFramework, but I don't know if I need to set up an iis server or something chane in my web configuration.

THX

+2
3

.NET -. .NET 4.0, .NET 2.0 (IIS 7)

+6

, .NET 4.0.

+3

Change the application pool to compatibility with .NET 4.0.

click to edit

Open IIS, then click on the application pool in the list and modify it to use the .NET Framework 4.0.

+3
source

All Articles