Rahul Soni's blog

Never assume the obvious is true!

Unable to connect to Visual Studio's Localhost Web Server

Unable to connect to Visual Studio's Localhost Web Server

  • Comments 88

Screwing up an installation is so easy! I realized it when I was working on an issue today and had to uninstall the .NET Framework (that's different story ;o). I used my Control Panel and uninstalled it, but I was not done yet! I wanted to wipe out all traces of .NET 2.0 from my box and I deleted the C:\WINNT\Microsoft.NET\Framework\v2.0.50727 folder. Then I simply re-installed it and found that everything was working fine except the projects which were being accessed through FileSystem. I was not able to debug those projects at all... Even a CTRL+F5 wouldn't work!!

Here is the error message which I got...

---------------------------
Microsoft Visual Studio
---------------------------
Unable to connect to Visual Studio's Localhost Web Server
---------------------------
OK  
---------------------------

Very soon, I found that there is a file called WebDev.WebServer.exe which was located in C:\WINNT\Microsoft.NET\Framework\v2.0.50727 folder and it was gone since I deleted the folder itself! Aahh... too late... But I was really happy when I found that when I copied the file WebDev.WebServer.exe from one of my colleague's box, it worked absolutely fine :o) And that just saved me a lot of time!

I would have hated myself, if I had to re-install the VS 2005 just because of a simple mistake.

The point to be noted here are...
1) Don't use Shift+Del to delete important folders. It is better to rename it ;o) (as if you didn't know already!)
2) In case you do the same mistake as I did... find a person who has the file, and Copy + Paste!!
3) It seems like VS2005 installation puts the file (WebDev.WebServer.exe) in the Framework folder. Take good care of it :o)

Cheers,
Rahul

  • actually i have the same problem and that exe file also exists in that directory

    give me a suggestions
  • How did you get the problem?
    Was it working earlier? Do you remember any change which was made in this box after it stopped working?

    You may also try using Filemon to see if there is any Access Denied or some file being asked for and not present in the system. May be that will help.
  • Thanks for the tip.

    I had the same problem yesterday. I was too fast deleting the v2.0.... folder. Now after i copied the webdev.webserver from my second machine all is working fine again.

    Cheers, Frank.

  • Thanks for the tip about the missing exe.  

  • Hi i am also facing same problem "Unable to connect to Visual Studio's Localhost Web Server", i have that "WebDev.WebServer.exe" file in my "C:\WINNT\Microsoft.NET\Framework\v2.0.50727" folder.

    I am not able to detect exact cause to this problem.

    I am not able to debug any web application.

    Event Ctrl+F5 is also giving same error...

    So, i get two error messages as below :

    1. "Unable to find version of the runtime to run this application"

    2. "Unable to connect to Visual Studio's Localhost Web Server"

    Please help me out...

  • Hi Prakash,

    Check if you are able to create a new Project. Also, find out if creating a project with FileSystem works or not. If filesystem works, your debugger is fine. Then check out what version is listed under the ASP.NET tab in your IIS server.

    Also, try using aspnet_regiis -ua followed with a aspnet_regiis -i and see if that helps.

    If you still have problems... Let me know the following...

    1. Does creating a new Project work?

    2. What is the Operating System and VS you are working on?

    3. When did this problem start?

    4. Has it ever worked correctly on this box?

    5. What happens when you try to debug against a File System project. Give me the exact error message which is thrown.

    6. What version is set for the project in IIS under that ASP.NET tab?

    Rahul

  • WebDev.WebServer.exe already exist but i replaced it with the one working on other machine...................It worked!!!!!!

  • I had a problem with .net 2005. When i install it and run it, it worked fine. I also restart my computer then also it was fine. But on another day when i come and run my project the same error comes. Then i again set up .net 2005. then it worked fine. But the same thing i have to do again and again setup of .net every day.

    So suggest me the answer of my problem

  • I had a problem with .net 2005. When i install it and run it, it worked fine. I also restart my computer then also it was fine. But on another day when i come and run my project the same error comes. Then i again set up .net 2005. then it worked fine. But the same thing i have to do again and again setup of .net every day.

    So suggest me the answer of my problem

    Megha

  • Hi Megha,

    It this happens daily, I have a feeling that there is something goofy going on from the Policy perspective.

    Give me the exact error message which you are facing. If it is the same error message as this post, try removing your PC from the domain and re-install. Let it be out of domain and try to repro the issue and see if that happens again.

    HTH,

    Rahul

  • hi

    i have installed visual studios Express webdeveloper addition,for two  days it worked

    well but for third day it showed error message

    so can any one help me plse to solve the problem

  • hi

    i have installed visual studios Express webdeveloper addition,for two  days it worked

    well but for third day it showed error message

    so can any one help me plse to solve the problem

    thank you

  • Hi Raghu,

    What is complete error message you are getting? Do you remember making any changes to your PC?

    -Rahul

  • hi rahulso

    I did not make any changes to my PC

    except i reinstalled the web developer again,

    it worked nicely for some time but again same problem continued

    The error message was unnable to connect to

    Visual Studio's local host webserver

    and also

    cannot find version of runtime to run this application

    i have replaced Webserver.EXE file from remote system and placed in my PC for some time it worked ,but again same problem occured

    can u plse give a solution for this?

    thannks

  • Hi Raghu,

    Can you give me the following information...

    1. Your OS

    2. Are you an Admin on your box?

    3. Is this PC part of a Domain or WorkGroup?

    4. Where are you located?

    5. Do you have IIS installed on your box? If yes, did you try creating a new project on your http://localhost/AppName??

    Regards,

    Rahul

Page 1 of 6 (88 items) 12345»
Leave a Comment
  • Please add 1 and 2 and type the answer here:
  • Post