Thursday, September 16, 2010

"LM/W3SVC/1/root/webapplication" already exists. Please choose a different alias.

This is the very common error that any web programmer can face when we web share a folder.The solution is to remove the virtual directory entry from the IIS window. But what if the entry does not exist in the IIS window. This situation comes when you delete/move the folder from the c:\inetpub\wwwroot folder before deleting its virtual directory. So the solution is to remove the virtual directory entry from the IIS.

Here is the Procedure to remove virtual directory entry from the IIS database?

Here are the 3 ways how we can do this.

1. Use following command

Syntax
iisweb /delete WebSite [WebSite...][/s Computer [/u[Domain\]User/p Password]]

You can get more help on this from here.

2. Recreate the folder with the same name in the c:\inetpub\wwwroot and then restart the IIS (use iisreset.exe). You will see the virtual directory with the same name in the IIS window, now remove the virtual directory from IIS.

3. Use the following command by opening the command prompt.
c:\inetpub\wwwroot\cscript adsutil.vbs DELETE "W3SVC\1\root\"

For more information on adsutil.vbs.

Hope this helps.

2 comments:

  1. Pretty! This was an incredibly wonderful post. Thank you for providing this
    information.

    Also visit my web-site Mine Craft Server Hosting

    ReplyDelete
  2. What's Taking place i am new to this, I stumbled upon this I've discovered It positively useful and
    it has helped me out loads. I'm hoping to contribute & aid other customers like its helped me.
    Great job.

    Here is my web page ... Used Cars for sale in Austin

    ReplyDelete