Automatic Virutal Directory Creation Failing in VS2010

One of the projects I work on involves a WCF service that is set up to run under IIS instead of the Visual Studio Development Server. This project has a couple of branches that from time to time are merged back into the trunk, which sometimes leads to the following error if the developer is prompted by Visual Studio to automatically create the virtual directory for the service to run under:

Creation of the virtual directory (URL) failed with the error: The URL '(URL)' is already mapped to a different folder location.

The reason this error occurs is because, based on which branch was being used when the file was committed to source control, the directory could be different.

I figured this would be a pretty easy thing to fix -- just delete the virtual directory in question. But I was surprised to go into IIS Manager and find that...it wasn't there. Yet I could go to the URL in question and receive an error page that suggested that the URL was, in fact, valid.

The fix was somewhat less obvious, but I found it. Here are the steps for resolving this when running under Windows 7 -- the steps may vary slightly in older versions:

  1. Select the applicable web site under the Sites node in the Connections pane on the left side of the window.
  2. Click View Applications in the Actions pane on the right side of the window. This will show the Applications view.
  3. Select the item from the Applications view with the URL you're trying to create. Then click Remove from the Actions pane on the right side of the window.

Comments

Moaz Jutt said…
hi this is Moaz,
i am facing the same problem as u explained above, but the solution you provided in the last is not very understandable.
Kindly explain the each step.
Kind regards

MOAZ
Anonymous said…
Thks !! =) Great and fast post

Popular Posts

Resolving the "n timer(s) still in the queue" Error In Angular Unit Tests

Silent Renew and the "login_required" Error When Using oidc-client

How to Get Norton Security Suite Firewall to Allow Remote Desktop Connections in Windows

Fixing the "Please add a @Pipe/@Directive/@Component annotation" Error In An Angular App After Upgrading to webpack 4

How to Determine if a Column Exists in a DataReader