13

Hi I would like to create a virtual directory at http://localhost

Its just a standard IIS 7.5 installation, meaning that http://localhost/ just shows the iis logo. But how do I remove that page and make it possible to use it for at virtual directory.

Right now Im getting this message in Visual Studio, when Im trying to create the virtual directory.

"Unable to create the virtual directory. The URL 'http://localhost/' is already mapped to a different folder location."

I can create a virtual directory at ex. http://localhost/web But I need it to be a http://localhost/

3 Answers 3

8

What you want is not a virtual directory. Just change the physical path of your Default Web Site to where you want it, or publish into that folder. By default the physical path is c:\inetpub\wwwroot\.

Default Web Site -> Manage Web Sites -> Advanced Settings -> Physical Path
1
1

Right click the folder that you want to make as the virtual directory. Under Properties->Web Sharing select the Default website.

Also click the option Share this folder. In Aliases give the name of the folder. Now click OK.

0

There's nothing "virtual" about the directory mapped to http://localhost. That's your web root, likely located at c:\inetpub\wwwroot\. You should be able to publish directly to that.

A Virtual Directory is basically configuring IIS to internally create a folder under the web root which points to a different folder on the file system, as opposed to one actually located under the web root folder. It doesn't sound like you need that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.