RSS
 

web.config error "Unrecognized attribute 'type'" for .NET 2.0

14 Feb

This applies to Windows Server 2003. This error can occur when you have .NET 1.0 and .NET 2.0 applications running on the same server.

This particular error can occur when you haven’t selected .NET 2.0. in the application settings.

Windows 2003 Uses Application Pools which can only support one version of the .NET framework at a time. If you are running both 2.0 and 1.0 applications on the same 2003 server then you have to create at least two application pools – one for each version of the framework. All of your 1.0 apps should be configured to use one pool and the 2.0 apps will use the other. The pool itself isn’t configured to specify which version it will support, but the app that starts first will “grab” the pool and lock it down to whatever version of the framework that particular app uses.  So if you have a 1.0 and 2.0 in the same pool, it will be a race between the two apps to see which can grab the pool first.  The winner will run fine and the loser will crash.  When IIS restarts, the race starts again.

 
7 Comments

Posted in .NET, IIS

 

Leave a Reply

 
Please leave these two fields as-is:
 
  1. Admin

    October 8, 2008 at 12:33 am

    Great post…i was having the same problem now its solved..

    cheers
    Admin
    Solutions For you

     
  2. AnubiS

    October 31, 2008 at 4:47 pm

    Thanks, i was fighting against this same error for an hour until i read this post…

     
  3. Scollege

    March 19, 2009 at 5:07 pm

    Sure wished it were this easy…we have the correct .NET settings for the web site and a separate app pool, but the error continues.

     
  4. Troubled

    May 27, 2009 at 1:56 pm

    Thanks a lot, i was having this problem , but now it’s been fixed.

     
  5. Tom

    September 24, 2009 at 10:32 am

    yeah, great post, helped met!

     
  6. vishu

    January 29, 2010 at 7:04 am

    thanks a lot for the post. it helped me!!

     
  7. Linconlshire SEO

    March 8, 2010 at 9:23 am

    Nice work! although I found that I just needed to change the target .net version for the site and this fixed it straight away.
    I then changed all sites in IIS to use .net 2 just in case another grabs the app pool and forces it into using the wrong version on next reboot.

    Is there any way to make it default to version 2 when you add a new site? it seems to default to version 1 on my windows 2003 machine.