We may get the following error after publishing a website on IIS 7.5.
 
 Parser Error Message
"Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive."
 
To fix it, we need to follow the below troubleshooting steps.
- Check on which .NET version the application is developed. Let's assume, it's .NET 4.0.
 
 
- Open IIS Manager and find the Application Pool, on which your website is hosted.
 
 
- Go to that Application Pool and check the .NET version and change it to 4.0 accordingly by clicking on Basic\Advanced Settings.
 
 
- If .NET 4.0 is not listed, go ahead and install it.
 
 
- If it still won't show up, go to command prompt and fire the below command to find a list of ASP.NET versions installed:
 
 C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis.exe -lv
 
 
- In the output, if .NET 4.0 is not listed, register it by firing the below command:
 
 C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis.exe -I.
 
 
- It should show up as .NET 4.0 in the .NET Framework Version dropdown for the application pool.