by Jeremy Canfield | Updated January 1st, 2017
Follow these directions to fix error 'Parser Error Message: Unrecognized attribute targetFramework' when attempting to view a ASP.NET Web page.
- Open a command line prompt as administrator, and type the following commands.
- cd C:\Windows\Microsoft.NET\Framework\v4.0.30319\
- aspnet_regiis.exe -ir
- Open IIS Manager.
- In the left panel of IIS Manager, expand the root directory.
- Select the website in question.
- In the right panel of IIS Manager, select Basic Settings.
- In the Edit Site pop-up box, click the Select button.
- In the Select Application Pool pop-up box, set the Application pool drop-down to ASP.NET v4.0. Click OK.
- Click OK to close the Edit Site pop-up box.
- In the right panel of IIS Manager, click Restart.