gulbaek
gulbaek

Reputation: 2541

Create virtual directory at http://localhost/

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/

Upvotes: 13

Views: 33804

Answers (3)

sindhu
sindhu

Reputation: 11

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.

Upvotes: 1

Martin Buberl
Martin Buberl

Reputation: 47144

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

Upvotes: 8

David
David

Reputation: 218827

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.

Upvotes: 0

Related Questions