We may get below error after publishing your
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 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 below command to find 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 below command:
C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis.exe -I.
- It should show up .NET 4.0 in the .NET
Framework Version dropdown for the application pool.
- Please refer here for more details on
aspnet_regiis.exe command utility