I have still problem with asp.net project. In Visual studio when i start debug it is all good and page working but, when i try it on iis7 showse this error.
SHOW 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 18: </connectionStrings> Line 19: <system.web> Line 20: <compilation debug="true" targetframework="4.0" /> Line 21: </system.web> Line 22:
Source File: C:inetpubwwwrootweb.config Line: 20
It seems problem with targetFramework but i do not know if i have to configure iis server or something chane in my web-config.
thx.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Change the .NET version on the Application pool for your website.
It must be .NET 4.0, not the .NET 2.0
View a List of Application Pools (IIS 7)
Method 2
Ensure the application pool is set to use .NET 4.0.
Method 3
Change your application pool to be compatible with .NET 4.0.

Open IIS then click on an application pool on the list and modify it to use .NET Framework 4.0.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0