Last post Oct 17, 2012 10:52 PM by dotnetnerd
Oct 17, 2012 11:21 AM|clevesteve|LINK
Trying to convert my ASP.NET 2.0 Web Site to ASP.NET 4.0 (want to use the Chart controls). I tried changing the build from 2.0 to 4.0 using the Property Pages -> Build, choosing .NET Framework 4.0. After I "applied," I got the following error.
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.
Line 13: </connectionStrings>
Line 14: <system.web>
Line 15: <compilation debug="false" targetFramework="4.0"> Line 16: </compilation>
Line 17: <customErrors mode="Off"/>
This error is not a total surprise. Based on
this article, this error appears in certain circumstances that are outside my sphere of understanding:
If the project is not a local IIS project, associate its IIS application with the Visual Studio when it is deployed to IIS. For more information, see the procedure later in this topic that corresponds to the version
of IIS that you are using.
If the IIS application is associated with the .NET Framework 2.0, the site will not work. ASP.NET will generate errors that indicate that the targetFrameworkattribute
The problem I'm having is, I don't understand what this solution is suggesting I do. Our IT department gave me access to a path to upload/edit files to create my web application so I don't understand the whole IIS side of things. Can someone help me understand
what has to happen for me to be able to convert my website to 4.0? Is there something specific I can ask my IT dept to do for me? Thanks.
Oct 17, 2012 11:25 AM|jprochazka|LINK
Make sure IIS is set to use the 4.0 framework, the AppPool used by the site in IIS to be specific.
Sounds like it is still set to use the 2.0 framework.
Oct 17, 2012 11:47 AM|gnosischief|LINK
what has to happen for me to be able to convert my website to 4.0? Is there something specific I can ask my IT dept to do for me?
1. if using IIS 7ask them to change .net framework to 4.0 present in basic settings of Application Pool.
2. then recycle application pool.
for iis 6 also need to associate application pool which is supporting .NET Framework 4.0
Oct 17, 2012 10:52 PM|dotnetnerd|LINK
Please make sure that you change your application pool from 2.0 to 4.0 framework.