ASP.NET 4.0 Applications can not run on IIS 5.1?

Published on Thursday, September 23, 2010

Some people are still using Windows XP Pro which only installed IIS 5.1. When you try to run ASP.NET 4.0 web application, you might meet the following error message:

Server Error in ‘/TestWeb’ 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 debug=“true” targetFramework="4.0" /> Line 17: Line 18: <authentication mode="Forms">

The resolution:

Run the following command:

aspnet_regiis.exe -i

The location where aspnet_regiis.exe resides: