With the new .NET 4 framework, comes some problems if you are still running still IIS 6 on Windows Server. IIS 6 does not let you have more than one framework at the time running in the same instance or website like IIS7 that can create a Application Pool targeting a different framework.
When IIS 6 runs under ASP.NET 2.0 (3.0 and 3.5 are superset, not frameworks) you are going to hit this error if the application is 4.0
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.
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 11: </configSections>
Line 12: <system.web>
Line 13: <compilation debug="true" targetFramework="4.0">
Line 14: </compilation>
Line 15: <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/></system.web>
Line 12: <system.web>
Line 13: <compilation debug="true" targetFramework="4.0">
Line 14: </compilation>
Line 15: <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/></system.web>
You have a few options, downgrade the .NET application to 3.5 that Visual Studio 2010 makes it really easy. Just go to the WebSite properties -> Application tab and there is a drop down with all the framework releases, select 3.5, you VS2010 will reload the project and modify the web.config, if you added web service reference, that you may have to delete them and re-add them under 3.5
Now, you’ll have to unregister the ASP.NET 4.0 under IIS6, to do so, go to your console windows and go to the directory Windows/Microsoft.NET/Framework/v4.xxxx and type->aspnet_regiis /u
Then register ASP.NET 2.0 by going to Windows/Microsoft.net/Framework/v2.xxxxx> type aspnet_regiis /i
Hope that work for you.
No comments:
Post a Comment