Vakul's .NET Realm

My journey towards .NET World…

  • Details

    Vakuls MCPD Certification Vakuls MCTS Certification Author's Pic

  • Blog Stats

    • 142,897 hits
  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 355 other followers

  • Follow me in Twitter:

    Error: Twitter did not respond. Please wait a few minutes and refresh this page.

  • qrcode
  • Subscribe


Creation of the virtual directory http://localhost failed

Posted by Vakul Kumar More on February 16, 2011

When creating a copy of an application from Visual Source Safe, sometimes developers get the following error message :

The local IIS URL http://localhost/ specified for Web project DemoWebsite has not been configured. In order to open this project the virtual directory needs to be configured. Would you like to create the virtual directory now?

After clicking ‘Yes’, a new error message will be displayed:

Creation of the virtual directory http://localhost/ failed with the error: The URL ‘http://localhost/’ is already mapped to a different folder location.

All the projects will be loaded expect for a project which states unavailable and by right-clicking the project and selecting the option of editing the file with an extension of either .csproj or .vbproj.

In the file, find <iisurl> tag with localhost.( <iisurl>http://localhost/</iisurl&gt;) Change the tag details to your application name (<iisurl>http://localhost/yourapp</iisurl&gt;). Reload the project and you should be able to load the project now.

Happy Coding. 🙂


9 Responses to “Creation of the virtual directory http://localhost failed”

  1. chetan said

    thanks sir

  2. toshiro said

    cool !

  3. Rayees said

    God bless you bro !! It helped .. Cheers


  4. Srujan said

    the IIS URL tag in the .csProj file is already set to “http://localhost/yourapp”
    but it still fails… of course if I delete the Virtual directory in IIS and reload the project then it works fine…..But I have to do this every time I switch between projects…..and I have to switch often,,,, is there any solution without this process…. ? like may be VisualStudio figures out and deletes the Virtual Directory or something?

    • Try the following solution:

      Close Visual Studio.
      open IIS Management and go to the application you have issue and delete it. (You are deleting just Virtual Directory)
      Open Visual Studio and try adding again.

      Let me know if it worked !!

  5. Vedavyasa said

    nice article, it helped …:)

  6. venky said

    Am unable to find the iisurl tag, can u plz let me know where it is present

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: