Skip to content

Running Multiple Version of .Net Framework in IIS 6.0

by admin on June 15th, 2006

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.

From → iis

26 Comments
  1. Mahesh Bhat permalink

    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. Ehsan permalink

    Really thanks

  3. DavidB permalink

    Thanks for this article. It helped us a lot.

  4. Mona permalink

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

  5. ravinder permalink

    found ur article just in time to save my neck

  6. LuigiBaby permalink

    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. Daniel Santana Rodrigues permalink

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

  8. Troy A permalink

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

    Thanks :)

  9. Praveen permalink

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

  10. hr_sn permalink

    You rock! Worked perfectly! :)

  11. S.Sairam permalink

    Hi,

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

    Please provide us a solutions.

  12. RaviKumar permalink

    Excellent and Nicely Drafted !!

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

  14. Chris permalink

    EXACTLY WHAT I NEEDED!!!!! THANKS!

  15. Afw permalink

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

  16. David Armstrong permalink

    Very useful – thank you!!!

  17. Madan permalink

    Good Stuff

  18. Mark Harby permalink

    Straight to the point, saved another life.
    Thanks

  19. Lee permalink

    Just the job. Thanks for the effort.

  20. Jon permalink

    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. DGL permalink

    Thanks!!!!!!

    Saved the day

  22. jared permalink

    Thanks for the step by step )

  23. Johann permalink

    Deeply appreciated !

  24. Fabricio permalink

    Usefull!!

  25. Lara Dutta permalink

    Great… Thanks for the help..

Trackbacks & Pingbacks

  1. Running Multiple Version of .Net Framework in IIS 6.0 « Me.Thoughts.ToString()

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS