From: Alan T on
VWD 2010
I copy all my asp project into a physical location in my pc.
Set up a virtual directory under IIS.

Open the browser for the main page.
eg
http://localhost/TestSite20100707/main.aspx

Got the error on the page showing the webconfig contents:



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: <assemblies>
Line 22: <add assembly="System.Design, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=B03F5F7F11D50A3A"/>

Source File: C:\Temp\TestSite\web.config Line: 20




--------------------------------------------------------------------------------

Version Information: Microsoft .NET Framework Version:2.0.50727.3607;
ASP.NET Version:2.0.50727.3614





I checked Registry that I have already installed .NET framework and ASP .NET
are both version 4.0.

Why the last line at the bottom shows .NET framework version 2.xx?




From: Mr. Arnold on
On 7/6/2010 9:10 PM, Alan T wrote:
> VWD 2010
> I copy all my asp project into a physical location in my pc.
> Set up a virtual directory under IIS.
>
> Open the browser for the main page.
> eg
> http://localhost/TestSite20100707/main.aspx
>
> Got the error on the page showing the webconfig contents:
>
>
>
> 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: <assemblies>
> Line 22: <add assembly="System.Design, Version=4.0.0.0, Culture=neutral,
> PublicKeyToken=B03F5F7F11D50A3A"/>
>
> Source File: C:\Temp\TestSite\web.config Line: 20
>
>
>
>
> --------------------------------------------------------------------------------
>
> Version Information: Microsoft .NET Framework Version:2.0.50727.3607;
> ASP.NET Version:2.0.50727.3614
>
>
>
>
>
> I checked Registry that I have already installed .NET framework and ASP .NET
> are both version 4.0.
>
> Why the last line at the bottom shows .NET framework version 2.xx?
>
>
>
>

Maybe, because you have not configured the IIS App Pool to use .Net
Framework 4.0 and it's using 2.0?