I have got another IIS error message: “Unknown attribute ‘targetFramework'”.
<compilation debug="true" targetFramework="4.0">
<add assembly="System.Web.Abstractions, Version=126.96.36.199, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
It seems to indicate that the site is configured to run under .NET 4 while IIS has been set up to run under an earlier version. To target .NET 4 in IIS, open the IIS Manager and expand the Application Pools node. Then find the application pool used by your web site, call the context menu and choose “Basic Settings” and then switch the target framework from 2.0 to 4.0.
Today I have faced with the “HTTP Error 500.19 – Internal Server Error” after publishing my ASP.NET project.
HTTP Error 500.19 – Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Module IIS Web Core
Handler Not yet determined
Error Code 0x80070021
The solution is to install (if it is not installed or reinstall) ASP.NET feature of IIS7.0:
Control Panel -> Program and Features -> Turn Windows Features On or Off -> Internet Information Services -> World Wide Web Services -> Application Development Features -> Check/Uncheck ASP.NET.