Tuesday, March 25, 2008

/LM/W3SVC/1/ROOT/AppName is unavailable

So I created this neat c# web service and went to deploy it to our clustered environment.
Before that I ran the web setup on a dev server and it installed flawlessly so what a big surprise it was that when i tried to install it in production I got this lovely message:



(it says: 'the specified path 'lm/w3svc/1/root/yourappname' is unavailable. the internet information server might not be running or the path exists and is redirected to another machine. please check the status of this virtual directory in the internet services manager')

don't you love it when all is fine while you develop but when you try to deploy something maddeningly breaks...

Few hours of google search didn't bring any solutions, so i had to figure it out myself, being the genius IIS admin, that i am (not).
first i thought this might be due to our production servers being in a cluster, (mis?)lead by the '...is redirected to another machine' part of the message, but even taking one or the other of the servers off the cluster (temporarily) didn't help.
after a few similar guess/error tries i simply created a folder in inetpub where my web service would be dwelling, created a virtual folder pointing to this empty folder, run the setup again and.....it didnt break this time(!) - simply copied the contents of the web service and off we went

so i guess Okam's razor works...even for deploying c# web service solutions in IIS

lovely ;-)

4 comments :

Anonymous said...

i had exactly this problem and yes, creating the virtual directory fixed it.

however, i think the root cause was a redirect that was previously put on the website.
i unintalled the new msi (and hence virtual directory) and installed the previous version. this obviously did not have the redirect. i then uninstalled and reinstalled the new msi.
worked fine.

Rashmi said...

Home Directory is set to "a redirection to a URL". change this with option "A directoty located on this computer". Now run your setup.

Anonymous said...

This helped me great thanks for this post!

Ciao Ed

Ambanna Yatnal said...

How do set "A directoty located on this computer" in IIS7.0. I could find option for this.
Even I tried creating Virtual directory (and also application) and tried to install my website with the same name but still failed to install.

please can anybody suggest.