views:

5501

answers:

7

Hello everyone,

I am debugging codeplex simple project => http://www.codeplex.com/sl2videoplayer. I am using VSTS 2008 + C# + Windows Vista x86 Enterprise. I have not modified any code of this codeplex project, and just press F5 to run VideoPlayerWeb project.

The current issue I met with is error message -- "Unable to connect to ASP.Net Development Server".

Here is my screen snapshots when clicking F5. Any ideas what is wrong?

http://i42.tinypic.com/15xs6jd.jpg

http://i39.tinypic.com/2d8rf3t.jpg

thanks in advance, George

+2  A: 

Could be a number of things...try these (check the last one first)...

  • Disable IPv6
  • Make sure there isnt an edit in the hosts file for localhost
  • Check firewall/virus settings to allow connections to/from devenv.exe
  • If you can preview in the browser make sure the URL in the browser uses the same port number as the port number shown in the ASP.NET dev server taskbar icon.
  • Try setting a fixed, predefined port in project properties

I got these from a couple of forums elsewhere, hopefully they can help. Good luck. Let us know what works and some more about your environment (firewall, anti virus etc) can help as well.

Marc
Sure, and thanks! I am confused about two of your solutions -- "Disable IPv6" and "Make sure there isnt an edit in the hosts file for localhost"? Could you explain what do you mean please?
George2
Network Connections - Right Click - Click Properties (for your internet connection): Then if IPv6 is in the list try to disable that.Your host file may have an entry in it for localhost, comment it out and save the file (using notepad)http://en.wikipedia.org/wiki/Hosts_file
Marc
I also faced this problem http://stackoverflow.com/questions/2096628/setting-up-development-environment-for-asp-net-mvc. After trying everything you said. I came to conclusion that WebDev.WebServer.exe may be corrupt. So, I've replaced `C:\Program Files\Common Files\microsoft shared\DevServer\9.0\WebDev.WebServer.EXE` with a fresh copy : http://www.4shared.com/file/116555696/ff3b0dc8/WebDevWebServer.html
claws
+2  A: 

That is very odd! I hate to suggest something as simple as restarting Visual Studio...but that is what sounds like the best first place to start. Also, check your project settings. As you said that you just downloaded this and tried to run it...perhaps the solution/project is not set up to use the Casini server that is shipped with Visual Studio?

Andrew Siemer
I have restarted VSTS but does not work. "perhaps the solution/project is not set up to use the Casini server that is shipped with Visual Studio" -- the error message I posted means VSTS thinks I should point to VSTS built-in web server or not? What project setting do you think I should check against?
George2
Another question is could I start the Casini server that is shipped with Visual Studio manually? If yes, how?
George2
A: 

Here are the steps

  1. 'Website' Menu in your visual studio ide.
  2. select 'Start Options'
  3. enable 'Use Custom Server' radio button.
  4. Enter any URL you desire similar to 'http://localhost:8010/MyApp'

Note1: you can use any port number not only '8010' but not designated port numbers like 8080(tcpip),25(smtp),21(ftp) etc.,

Note2: you can use any name not only 'MyApp'

This solution works for sure unless your WebDev.Webserver.exe is physically corrupted.

A: 

Try commenting out the following line, if it exists, in your hosts file (%windir%\System32\drivers\etc\hosts):

::1     localhost

This worked for me using Visual Studio 2008 SP1 on Vista Ultimate x64 SP2.

brandon
+2  A: 

I had this problem with VS 2010, and it was as simple as terminating the "WebDev.WebServer40.EXE" process. Although the icon was no longer showing in the system tray, the process was still running.

Beau
This is the correct answer ;)
Brian
A: 

i have done my project in visual studio .net 2008 and wen i try to compile i get the following error as:

WebDev.WebServer.exe has encountered a problem and needs to close. We are sorry for the inconvenience.

and after this

unable to connect to the asp.net web devolopment server error is coming

pls help me

chitra