Search code examples
c#asp.netdeployment.net-framework-version

Runtime problems for ASP.Net website in IIS7/Win7 .Net 4.0


In VS2010 the project's target framework is 4.0. In IIS7, localhost's .Net version is 4.0. But for my application's App Pool, there's no 4.0 framework available to choose from. And after I deploy the site and browse a file from it, I get this error:

Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

Source Error:

Line 14: 
Line 15:   <system.web>
Line 16:     <compilation debug="true" targetFramework="4.0" />
Line 17: 
Line 18:     <authentication mode="Forms">


Source File: C:\inetpub\wwwroot\TestApp\web.config    Line: 16

Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927 

Please help me out.

Thanks Reddy


Solution

  • You should install the .net 4 runtime on your server. if you already did run aspnet_regiis.exe