Running Multiple Version of .Net Framework in IIS 6.0

Different versions of .Net framework can work side by side in a single web server (IIS). But after porting my finished project to the production server (IIS 6.0 running on Windows Server 2003), I got this error message:

I have projects made with .Net framework 1.1 and 1.0 working well side by side with my 2.0 web applications but migrating it to an IIS 6.0 made my app behave that way. What seems to be the problem?

After I searched MSDN and other technical blog, I came across Scott Forsyth’s Weblog article on running multiple versions of ASP.Net. I found out that IIS 6.0 handles running an application differently from it previous counterparts.

According to his article, IIS 6.0 now utilizes Application Pools. In which

“A system administrator is able to create groups of sites and place each site in its own group. Whenever a site needs to run, a w3wp.exe process will start for its application pool if it hasn’t already started. This brings with it a number of welcome security, performance and management advantages. You are now able to specify your own Identity User which can be unique per Application Pool.”

Though this is a welcome functionality for IIS 6.0, it has one catch - you cannot run more than one framework within the same Application Pool. This is what causing my app’s “crazy” behavior.

How to fix problem? It’s pretty easy and can be done inside IIS 6.0 alone. Here’s the step by step procedure.

1. Start Internet Information Services (IIS) Manager. Tip: Type “inetmgr” on the Run window then press [enter].
2. Right-click the Application Pools Node, then New, then click Application Pool.

3. In the Add New Application Pool dialog box, type TestPool in the Application Pool ID text box. Leave the Use default settings for new application pool option selected, and click OK. This creates a new application pool called TestPool.

4. You can nominate a new different username and password on your application by setting it in the Application Pool’s Properties window and go to Identity tab.

5. Return to the Internet Information Services (IIS) Manager.
6. Right-click on your web application then click Properties.
7. On the Home Directory tab in Properties dialog box, select your newly created application pool from the Application Pool drop down list. Click ok.

That’s it! Now you can run multiple versions of ASP.Net framework on your IIS 6.0.

25 Responses to “Running Multiple Version of .Net Framework in IIS 6.0”


  1. 1 Mahesh Bhat

    Dear Francisco,
    I found this artcile when I needed it most and it helped me a lot.
    Thanks a lot for the article.
    Mahesh

  2. 2 Ehsan

    Really thanks

  3. 3 DavidB

    Thanks for this article. It helped us a lot.

  4. 4 Mona

    Thanks. I’ll try it to my server. Hope it works.

  5. 5 ravinder

    found ur article just in time to save my neck

  6. 6 LuigiBaby

    Hi,

    Great article, thanks. You could add a paragraph or two on the fact that one cannot run a root app using .NET 2 and a .NET 1.x app in a virtual directory AT THE SAME TIME, due to Configuration file hierarchy (see http://msdn2.microsoft.com/en-us/library/ms178685(vs.80).aspx). The other way around (.NET 1.x root and .NET 2 vdir) works just fine, though, provided they use a different app pool, as you mention.

  7. 7 Daniel Santana Rodrigues

    Thanks for this article, its very good, save my life. ;-)

  8. 8 Troy A

    Thanks for the article, saved me be big time.
    Looks like im not the only one

    Thanks :)

  9. 9 Praveen

    Hi,
    Found this at the right time.. a real life saver.. keep up the good work.
    And thanx a ton.
    Bye,

  10. 10 hr_sn

    You rock! Worked perfectly! :)

  11. 11 S.Sairam

    Hi,

    We have tried the option given above but it failed. What do we need to do?

    Please provide us a solutions.

  12. 12 RaviKumar

    Excellent and Nicely Drafted !!

  13. 13 Serge

    Thank you very much for your article, it helped me quite a bit.

  14. 14 Chris

    EXACTLY WHAT I NEEDED!!!!! THANKS!

  15. 15 Afw

    I went berserk on my server, but now I understand why it constantly crashed. Great article, 100x more usefull as MS KB articles.

  16. 16 David Armstrong

    Very useful - thank you!!!

  17. 17 Madan

    Good Stuff

  18. 18 Mark Harby

    Straight to the point, saved another life.
    Thanks

  19. 19 Lee

    Just the job. Thanks for the effort.

  20. 20 Jon

    Thank you very much; good results the first time setting up the pool. As said earlier in the thread, much better than MS support articles as this cut to the chase (although the answer is probably at MS; just have to wade through the official verbage)

  21. 21 DGL

    Thanks!!!!!!

    Saved the day

  22. 22 jared

    Thanks for the step by step )

  23. 23 Johann

    Deeply appreciated !

  24. 24 Fabricio

    Usefull!!

  25. 25 Lara Dutta

    Great… Thanks for the help..

Leave a Reply