Monday, January 28, 2013

How to fix asp.net configuration Error

I try to upgrade my previous project from .Net Framework 2.0, 3.0 and 3.5 to the latest
.Net Framework 4.5.

Server Error in '/MyOldApp' 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 14:   -->
Line 15:   <system.web>
Line 16:     <compilation targetFramework="4.5"/>
Line 17:     <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
Line 18:       <controls>

Source File: C:\Development\Intranet\MyApp\web.config Line: 16


Version Information: Microsoft .NET Framework Version:2.0.50727.3623; ASP.NET Version:2.0.50727.3618 


the root cause of this issue is that all my application had been configured  to run windows authentication and run under the application pool that configure with service account.

when i set up the application pool, it was configured to run in the asp.net 2.0 environment. 
as a result, i will get the above error when i deployed my upgrade code to staging environment.

after i create a new applicaiton pool running in .net framework 4.0. the configure error is fixed.

No comments:

Post a Comment