Tag Archives: asp.net

IIS: Unknown attribute “targetFramework”.

I have got another IIS error message: “Unknown attribute ‘targetFramework'”.

<system.web>
  <compilation debug="true" targetFramework="4.0">
    <assemblies>
      <add assembly="System.Web.Abstractions, Version=4.0.0.0, 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.

IIS HTTP Error 500.19 – Internal Server Error

Today I have faced with the “HTTP Error 500.19 – Internal Server Error” after publishing my ASP.NET project.

Additional details:

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
Notification BeginRequest
Handler Not yet determined
Error Code 0x80070021

Solution:

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.