Server application unavailable: installing IIS on .NET 2.0

I feel so dirty, but for a project I’m working on at the moment I have to use ASP.NET instead of PHP; “why?” is a question for another day. Anyway, I’ve installed IIS before so that wasn’t a big problem… or so I thought.

I already had the .NET 2.0 framework on my XP machine so went straight to installing IIS (5.1 comes with XP Pro). It installed easily enough and my hello world html file was served without any major problems (actually that’s not true, before I copied my own files across I tried to check the IIS default pages served ok only to discover, through more googling, that if I used IE instead of Firefox that annoying box asking me for a password would go away).

Now my ASP.NET issue. I got a Server application unavailable error message in big red letters when I tried to run any .aspx (ASP.NET) scripts and couldn’t figure out for the life of me why. The Event Viewer, where IIS errors are logged, gave little more by way of help: Failed to initialize the AppDomain:/LM/W3SVC/1/ROOT

Err… What?! I worked out that it wasn’t affecting html pages, just ASP ones - and only .aspx ones at that, suggesting it was .NET-related.

As it turns out the problem was that I had installed .NET before IIS. It’s easy enough to fix, but it took 20 solid minutes of googling to find the solution in a Microsoft community newsgroup (and then realise that I’d have found it already if I’d just read to the bottom of a 4 year old forum post I’d already found).

Anyway, what you need to do if you’re getting this “Server application unavailable” message is navigate to your .NET directory (something like C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727) in a command prompt and run the command aspnet_regiis.exe -i which will register ASP.NET with IIS. If that still doesn’t work, there’s always PHP.net ;)

Bookmark and Share

45 Responses to “Server application unavailable: installing IIS on .NET 2.0”

  1. Josh Spillers says:

    Thank you so very much.

  2. nerd. says:

    Glad I can help!

  3. dexter says:

    YOU ARE THE MAN!!!! Thank you so very much!

  4. Mike says:

    OMG, I just spent 3 hours trying useless fix after useless fix trying to solve this problem. I’m putting you in my will. :)

  5. daniel raharjo says:

    thank u, arigato, xie xie, terima kasih, matur nuwun :)

  6. Dragos r says:

    Multumesc/ thank you

  7. Kevin deLeon says:

    Thanks…You are the MAN!!! Might I ask where you found this fix?

  8. nerd. says:

    Kevin, there are links in the article. Specifically: Microsoft newsgroups and asp.net forums

  9. h.e.y says:

    thank you very much…

  10. lizelle says:

    Dude, thanks very much. I also searched everywhere, and could not get the line to run. thanks again.

  11. Michael Thorn says:

    You sir, are a star!

    Quite why my client insists on this over PHP I don’t know and I don’t want to know but you have saved my skin!

  12. Darren says:

    Great. I’ve been searching to fix this problem. Working on a job where I have to use ASP instead of PHP. Even amidst the pain, your parting remark about PHP.net brought a smile.

    Thanks.

  13. Matt D says:

    Very nice - worked a real treat for me!! Like the PHP.net remark too :D

    “Server application unavailable” fixed by aspnet_regiis.exe -i

  14. Jay W. says:

    I’m working on this very same issue and things seem fine so far but one question….do I navigate and run the command from the most current ASP.NET 2.0.50727 directory or do I run the command under the directory for the ASP.NET version(1.1.4322 ) that the site was using before? I see after I run it under the 2.0 directory it obviously changes the asp.net version used by the site to 2.0…

  15. nerd. says:

    Jay,

    I’m not an expert on Microsoft’s .NET platform, so please bare that in mind when reading the following.

    The issue I described resolved an issue when you install IIS after the .NET framework. If you already had a site running that would suggest you had IIS first and then installed .NET, in which case the .NET framework should register itself with IIS during installation. Maybe your site needs to be run under .NET 1.1 (in which case you should be able to select the .NET version to use by going to the web site’s properties in IIS manager and looking under the ASP tab).

    HTH.

  16. Lars K / Denmark says:

    I line up with the others, thanking you a lot for this tip. I had the exact same problem - and your tip simple did the job.
    I am no .NET nor ASP man at all, so I could have spent days in the cyberjungle searching for knowledge if I hadn’t stumbled over your tip here pretty early - by pure coincidence.
    You made my day - thanks again :-)

  17. batfinger says:

    Yeah good one thanks.

    On XP pro. Had everything running fine with asp.net 2.0 (never had v1.0 or 1.1) and after installing some updates the dreaded “server application unavailable” took over. Ponderous.

  18. Slawas says:

    thanks geek!

  19. Suman Biswas says:

    Thanks a lot.
    Suman From India

  20. Mark Smith says:

    Transfered site from Server 2003 to XP Pro and over thought the problem. This simple little fix solved my issue. Thanks for publishing!

  21. mwasalanga says:

    I am very grateful to find that the instruction I got solved my problem with a minimum delay.
    thanks very much indeed.

  22. Andrew says:

    Hey, Bud !!!
    You have justed saved us many fruitless hours. Thanks !!!

  23. Mueen says:

    Sir,
    I have tried it but still i am getting problem.Actually when i am hitting “http://localhost” ,the page is calling oracle http server not microsoft’s.Please help me how can i solve this issue.

  24. Frozeneyes says:

    thanks alot this is amazing i was looking for it for one week now thanks man for ur help

  25. RÃ¥tta says:

    I’m so glad!
    I got fixed a problem that took 2 whole work days (8+8=16hours) to solve this problem, until i found this!!
    Thank you very very much!

  26. Alan says:

    Thanks - 2 wasted days. ready to call MS and use a support instance. You saved the day

  27. » More aspnet_regiis Goodness - this time on Vista @ nerd. says:

    [...] time ago I published a blog describing the use of a command line tool called aspnet_regiis.exe to overcome a “Server Application Unavailable” message when I was trying to get ASP.NET working on IIS 6 on Windows [...]

  28. tom says:

    Great thanks!
    You help me fiex the problme.

  29. Dunc says:

    Thanks a bunch!

  30. Jason P Sage says:

    Thank YOU! (Such annoying trivia to always have to remember huh?)

  31. amr says:

    if this thing works witout problems , ill get a promotion

  32. Khem Raj Bhattarai says:

    Thanks, really use full tips.

  33. aom says:

    Thank you so much your command help us

    JubxxJubx

  34. Nawar says:

    Really thanks, you saved the time required to remove & reinstall IIS, .NET. Really many thanks

  35. jmie says:

    Dude, you totally saved me. Though, I’d rather use perl with a flaming spear in my chest than deal with this IIS, ASP.NET trash. Makes me wanna try mono. Anyway…thanks again!

  36. Riyas says:

    Thank you very much ,,,,,,,,,, issue fixed and but we need to enable it on IIS to remove the 404 for not found error after the installation as

    1. Open up the Internet Information Services (IIS) Manager (which you find under Administrative Tools)
    2. Expand your server
    3. Select Web Service Extensions
    4. In the right hand pane, click ASP.NET v2.0.50727 (or a later version number) and then click the Allow button.

    Riyas

  37. Matt says:

    Thanks for the post - seems you’re 3rd on Google for “IIS XP asp.net Server Application Unavailable” - saved me a heck of a lot of looking around.

  38. Simon says:

    As Matt said, I found your site from Google. I only wish I viewed your site before spending countless hours wasted on trying to figure out what was wrong. Thanks!

  39. John Doe says:

    BS

  40. JWC says:

    Possibly the 5th time that I’ve had to do this. Argh. thanks for the post, saved me much frustration.

  41. pat says:

    THANKS!! You saved my day.

  42. Mohsen says:

    Thanks it works.
    a brief manual:
    Register .net framework with iis
    in command prompt
    ———————————-
    C:
    CD\
    CD C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
    aspnet_regiis.exe -i

  43. Monika Sharma says:

    Hi

    I have IIS 5.1 and asp.net 1.1,2.0 on my pc (WIN XP). I am able to regiter IIS with asp.nwet 1.1 but while registering IIS with ASP.NET 2.0 1 error is writtein in log file ASPNETSetup_00002.log

    Failure Determining if we are running on a domain controller: IsDomainController failed with HRESULT 80070842: ‘The Server service is not started. ‘

    can you please provide the resolution of thei problem

    Thanks

  44. Paddy says:

    Thanks a lot. you saved my time.

  45. jwl says:

    Thanks !!!! Saved me a ton of time!!!

Leave a Reply