Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

asp.net web-config error

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:\inetpub\wwwroot\web.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.

like image 249
Eddy_Screamer Avatar asked Apr 20 '26 04:04

Eddy_Screamer


2 Answers

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)

like image 108
VMAtm Avatar answered Apr 21 '26 16:04

VMAtm


Ensure the application pool is set to use .NET 4.0.

like image 25
Oded Avatar answered Apr 21 '26 16:04

Oded



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!