views:

470

answers:

4

I have installed Visual Studio .NET 2005. But when I am trying to execute an asp.net application then I am getting the following error:

Unable to open the Web 'http://localhost/adiii'. Could not find a Web server at 'localhost' on port 80. Please check to make sure that the Web server name is valid and your proxy settings are set correctly. If you are sure that everything is correct, the Web server may be temporarily out of service.

Click here to view screenshot of the error I am getting

Can anyone please tell me the solution of this problem. As we know there is embedded Web deployment server inside VS2005 then why its giving me this error??

+5  A: 

It looks like when you created the project, you selected HTTP for the location instead of the default, File System. HTTP means you have an existing web server (not Visual Studio) that you want to run and test your project on (and where Visual Studio will attempt to find your source code).

Create a project and select File System to create a project on your harddrive that will be run using Visual Studio's internal web server (you can then publish/deploy the project to a real web server when you want)

David
That's a good point. When he said he was executing an "ASP.NET application" I assumed he was able to load the project and was actually trying to run it.
Randolpho
I made exactly the same assumption based on the description, confusing me as to how his local IIS server disappeared without his knowledge. But the screenshot shows the VS start page with no solution open at all (far right), the same as if one was trying to create a new project.
David
A: 

Visual Studio does have an embedded web server, but it never operates on port 80. Your URL clearly points to port 80.

The most likely problem is your program itself working inappropriately, but without code I can't help much more.

Randolpho
It is possible to run it on port 80 (as long as you aren't already running a real web server), but you have to change from Auto-Assign Port to Specific Port and enter 80 in the project properties page. By default web projects are set to auto-assign, which uses any available high port number.
David
+2  A: 

Are you explicitly have defined that the internal web server should run the application on port 80?

The default behavior is that it runs on a random port. If your settings are ok, then it might be a port conflict with another web server on your machine (Apache, IIS).

Sometimes even a Skype can okuppy port 80 and cause similar problems.

Update:

Now i see - you're using Web Site project, and we assumed you're working with Web App project instead.

In this case, the procedure is slightly different: You select the project in Solution Explorer and open Property Pane. Here you should be able to identify two properties for the project: Port number and Use dynamic ports. I assume your first property is set to 80, and second one to false. Change the second one to true and you should be able to fix the problem.

ljubomir
I don't know? how to reset it to random port ??
Prashant
@Prashant: Check under the project > Properties > Web > Servers section in VS. There you should be able to set the desired port and run the project to have it open in your browser.
ljubomir
I am getting this http://www.flickr.com/photos/prashantvictory/3292508373/sizes/o/ type of property window when I am viewing property of my web project
Prashant
+1  A: 

There's a very good chance that you created the project in VS2003 and upgraded it to VS2005. VS2003 uses HTTP (a local installation of IIS for example), whereas VS2005 projects use the built-in server -- most likely, the upgraded project is still trying to use the local IIS which doesn't exist.

Do this: Right click on your project, choose "properties", and navigate to the "Web" tab on the window which pops up. You'll get a screen which allows you to choose which server you want to develop on, then make sure the buttons next to "Use Visual Studio Development Server" and "Auto-assign port" are checked.

Here's a visual reference if you need one:

http://img24.imageshack.us/my.php?image=confignw0.png

You should be be good to go now.

Juliet
I am not getting the settings as displayed in the image. Its opening only a simple window, where I am not having the Web tab. Can you please tell me how can I get these settings???
Prashant
I am getting this http://www.flickr.com/photos/prashantvictory/3292508373/sizes/o/ type of property window when I am viewing property of my web project
Prashant