tags:

views:

130

answers:

2

I am trying to run my ASP.NET Web Application Project in my Local IIS Web Server instead of using the Visual Studio Development Server. It seems to only allow me to run my application in a Virtual Directory off of the Default Web Site. However, I would like to run the application in the root of the Default Web Site itself.

I go into the properties of my project, go to the Web tab, click the User Local IIS Web server radio box, and change the Project URL to http://localhost/. However, when I attempt to save, it tells me I need to configure the Virtual Directory, although I am not using a Virtual Directory.

Has anybody made this work before? Thanks!!

A: 

It sounds like localhost port 80 is already in use.

IIS creates a default web site that listens on localhost port 80. Have you disabled that before trying to add yours?

Another approach is to have your site listen on a different port, 81 for example.

RickNZ
That's the website I am trying to use. I am trying to have my application sit in that website so I can call it using http://localhost/.
Mike C.
So, do you want to have your site be part of an existing site that's already on localhost? In that case, you should configure a virtual directory, and put your app in there; although there are limits to what such an app can do in its web.config. Or are you trying to replace the existing site on localhost? In that case, you will need to disable what's there, and create a new site that points to your files.
RickNZ
Which is what I tried to do. Check my original post. I want to be able to have Visual Studio run the project in that location when I debug.
Mike C.
Sorry, I didn't see anything in your post about either disabling the existing site or creating a virtual directory.
RickNZ
A: 

So far I used a Post-Build event to copy the contents of my project to c:\inetpub\wwwroot\ and I set the Start Action's Start URL to http://localhost/. Not very elegant, but it gets the job done. I would love for somebody to include a more elegant solution.

Mike C.