Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new to Web application Setup development and installation .I have create Setup File for web application and installed it.During the browse option from IIS Manager it gives following error.

C#
Server Error in '/KDemoSetup1' Application.

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 17: 
Line 18:   <system.web>
Line 19:     <compilation debug="true" targetFramework="4.0" />
Line 20: 
Line 21:     <authentication mode="Forms">

Source File: C:\inetpub\wwwroot\KDemoSetup1\web.config    Line: 19 

Version Information: Microsoft .NET Framework Version:2.0.50727.5485; ASP.NET Version:2.0.50727.5483


.
Posted
Comments
Andy Lanng 10-Dec-15 5:36am    
Check the app pool in IIS. It is often set to .Net2.0 by default. Either change it or create a new app pool with .Net4.0.

In fact - it says as much in the error - I'll add a solution

1 solution

IIS runs we applications in specific environments calls AppPools. You can seet which is running your web application in IIS by opening the web apps Advanced Settings (on the right-click menu).

These app pools are usually set to .Net2.0 by default, as yours is:
Version Information: Microsoft .NET Framework Version:2.0.50727.5485; ASP.NET Version:2.0.50727.5483

If you have Asp .Net4.0 installed, then you can just change the app pool settings (in app-pools in IIS) or create a new one for .Net4 apps.

If you haven't installed Asp .Net 4.0 then the steps are simple.

Here's a link on how to do so:

http://stackoverflow.com/questions/4890245/how-to-add-asp-net-4-0-as-application-pool-on-iis-7-windows-7[^]
(sorry for the cross-forum link)

Hope that helps. Let me know if you get stuck

Andy
 
Share this answer
 
Comments
SujataJK 10-Dec-15 6:31am    
Thanks @Andy Lanng.
It Really helpful for me.I Solved my problem by changing DefaultAppPool setting of .net framework version to 4.0 in in Application pool.It Work.....
Andy Lanng 10-Dec-15 6:46am    
Glad to hear it ^_^

Don't forget to accept the solution so others can find it in future ^_^

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900