Brunov's blog

Sergey Vyacheslavovich Brunov's blog

IIS: Unknown attribute 'targetFramework'

2011-08-28 18:06:38 Moscow time

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.

Tags: asp.net iis web deploy