title: unrecognized attribute 'targetframework'
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/7530725/unrecognized-attribute-targetframework-note-that-attribute-names-are-case-sen">Unrecognized attribute &#39;targetFramework&#39;. Note that attribute names are case-sensitive</a>  </p>
  </blockquote>
  
  
  
  <p>Firstly, let me say that I'm aware that this question has been asked a few times on this site - but the answers to all of these don't resolve my issue.</p>
  
  <p>I'm seeing the following issue when I try to add a new managed handler in IIS7:</p>
  
  <blockquote>
    <p>Unrecognized attribute 'targetFramework'. Note that attribute names
    are case-sensitive.</p>
  </blockquote>
  
  <p>The environment is Windows Server Enterprise 2008 SP1 with IIS7 installed.</p>
  
  <p>My application is using .NET 4.0. The .NET framework was installed after IIS:</p>
  
  <p>I've tried/checked the following:</p>
  
  <ul>
  <li>My app pool is using .NET 4.0 (I have one version of .NET 4.0 installed, no beta's etc.)</li>
  <li>Ensured .NET 4.0 is registered correctly with IIS using 'aspnet_regiis.exe -iru'. </li>
  <li>Recycled the app pool, rebooted the machine.</li>
  <li>Completely uninstalled .NET 4.0, then re-installed it.</li>
  <li>Removed the 'targetFramework' attribute - this just causes a crash elsewhere.</li>
  </ul>
  
  <p>To me it looks like IIS is still referencing a previous version of .NET somehow, even though my app pools in IIS tell me they are using .NET 4.0.</p>
  
  <p>My website loads fine, but I can't setup my custom image handler due to this issue.</p>
  
  <p>I'd greatly appreciate any advice.</p>
  
  <p>Thanks.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>This is crazy.. I've completely rebuilt by environment from scratch:</p>
  
  <ul>
  <li>Download 'Windows Server Enterprise without Hyper V SP1' from MSDN.</li>
  <li>Install .NET 4.0</li>
  <li>Install ASP.NET MVC 3</li>
  <li>Add the 'Web Server' role - ensure App Pool is using .NET 4.0</li>
  <li>Deploy my project</li>
  </ul>
  
  <p>The same error occurs when I try to add a custom hanlder mapping. I'm either doing something incorrectly / completely stupid or there is some issue with IIS7 in this setup. IIS doesn't recognise the 'targetFramework' attribute from .NET 4.0, even though my app pool is set to use .NET 4.0.</p>
  
  <p>If I use the command 'aspnet_regiis -lv', it tells me that only .NET 4 is registered with IIS.</p>