Error Unable to connect to Visual Stutio's localhost web server

Last post 12-12-2008 6:10 AM by vijvipin. 52 replies.

Sort Posts:

  • Error Unable to connect to Visual Stutio's localhost web server

    09-16-2005, 11:30 AM
    Locked
    • Member
      334 point Member
    • Truc-Mi
    • Member since 09-16-2005, 3:21 PM
    • Posts 134
    Hello! I am trying to run a new website created using VWD 2005 and got this error message isntead can someone tell me what am I doing wrong.

    "Error Unable to connect to Visual Stutio's localhost web server"

    I am using Windows XP running, IIS V5.1, VWD Express Beta 2005, I have both Framework 1.1 and 2.0 beta 2 installed on my PC.

    on my new test site all I have is 1 Default.aspx page with a simple lable text on it.

    Thanks in advance.
  • Re: Error Unable to connect to Visual Stutio's localhost web server

    09-20-2005, 11:37 PM
    Locked
    • Contributor
      4,570 point Contributor
    • danmor
    • Member since 11-04-2002, 9:48 PM
    • Bellevue, WA
    • Posts 910
    • AspNetTeam

    1. What is the path of your web root?  Is it http://localhost/blah, or "D:\websites\blah"? 
    2. Can you give more information about the error?  Is this a Windows alert, or is it a message you see in a web page in the browser? 
    3. Sounds like you are trying to debug (F5).  Have you tried Ctrl+F5 (Run without debug)?  Does your web site run in that case?

    -Dan
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Error Unable to connect to Visual Stutio's localhost web server

    09-21-2005, 8:55 AM
    Locked
    • Member
      334 point Member
    • Truc-Mi
    • Member since 09-16-2005, 3:21 PM
    • Posts 134
    Thanks for getting back to me, here is the additional information about my PC settings.

    I have a simple Default.aspx page with just 1 label with a few characters in it just to test first to make sure my configurations are good before creating my website.

    My web root is http://localhost
    My project is saved in C:\Documents and Settings...\Visual Studio 2005\Websites\Website1

    If I tried Ctrl+F5, IE started and give me a message "The page cannot be displayed,..."  the URL in IE listed as http://localhost:1303/Website/Default.aspx
    If I tried F5, I got this error message box pop up "Unable to connect to Visual Studio's Localhost Web Server" this seems like a Windows alert message box

    Thanks in advance for your help.
  • Re: Error Unable to connect to Visual Stutio's localhost web server

    09-21-2005, 2:10 PM
    Locked
    • Contributor
      4,570 point Contributor
    • danmor
    • Member since 11-04-2002, 9:48 PM
    • Bellevue, WA
    • Posts 910
    • AspNetTeam
    You are confusing two different web servers.  If you have XP Pro installed then you may have IIS installed which is an optional Windows component.   IIS serves up webs from http://localhost

    There is another web server installed with Visual Web Developer called "ASP.NET Development Web Server" (call it WebDev for short).  The ASP.NET Development Web Server opens a port on the local machine and serves up a web from a file location.  WebDev URLs contain the port that was opened, and that's what the 1303 is ( http://localhost:1303/Website/default.aspx) 

    Look for the file WebDev.WebServer.exe in c:\Windows\Microsoft.NET\Framework\v2.0.xxxxx  If you use Windows Search make sure to turn on the Search Hidden Directories option.   Does the EXE exist in your Framework directory?
    -Dan
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Error Unable to connect to Visual Stutio's localhost web server

    09-21-2005, 3:40 PM
    Locked
    • Member
      334 point Member
    • Truc-Mi
    • Member since 09-16-2005, 3:21 PM
    • Posts 134
    - Yes my PC with Windows XP Pro has IIS installed, and I am currently have a few test web sites developed using ASP.NET and the Framework 1.1, they seems to work fine.  But not with the new site built using the Visual Web Dev 2005.

    - Under my C:\Windows\Microsoft.NET\Framework\ I have Four folders:

          1) V1.0.3705
          2) V1.1.4322

          3) V2.0.50215    The WebDev.WebServer.exe is exist in this folder
          4) V2.0.50727    The WebDev.WebServer.exe is Not in this folder

    Can IIS co exist with the new Web server or I can only have 1 active at a time?

    Any suggestions is much appreciated, I really wanted to try out the new Visual Web Dev 2005 but currently I am unable to make it work.   My next choice is to try to find a PC without any IIS and Framework 1.1. but it would be nice if I can make this work on my main PC.

    Thanks again for your response.

    LV






  • Re: Error Unable to connect to Visual Stutio's localhost web server

    09-30-2005, 8:25 PM
    Locked
    • Contributor
      4,570 point Contributor
    • danmor
    • Member since 11-04-2002, 9:48 PM
    • Bellevue, WA
    • Posts 910
    • AspNetTeam
    The porblem appears to be that you did not remove Beta 1 before installing Beta 2.  You should only have one directory named v2.0.5xxxx.  I suggest uninstalling Beta 2, following the Beta 1 uninstall steps (http://lab.msdn.microsoft.com/express/uninstall/) and then try re-installing Beta 2.

    Yes, the WebDev server can co-exist on a machine running IIS.  They can both be running at the same time.

    The v1.1 and the v2.0 Framework can co-exist on the same machine.  But you must be aware of which version of the Framework is script-mapped to the IIS root and virtual webs on the site.  You can have a mix of both 1.1 and 2.0 applications.
    -Dan
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Sad [:(] Re: Error Unable to connect to Visual Stutio's localhost web server

    10-03-2005, 4:16 PM
    Locked
    • Member
      334 point Member
    • Truc-Mi
    • Member since 09-16-2005, 3:21 PM
    • Posts 134
    I follow the instruction to remove all Express products from my PC, I removed any trace of Framework 2.0 Beta, reboot, the PC and download the VWD and follow the setup, it installed, Framework 2.0, SQL Express and VWD, and I still have the same problem.  I am not sure why, is it because of of my company Lan config?

    When I tried to launch the ASP.Net Configuration from VWD or try to launch a simple web site with 1 page, 1 label on it I got this error message.
    "Unable to connect to Visual Studio's Localhost Web Server"

    Is there any other suggestions that I can try to get this going? 
  • Re: Error Unable to connect to Visual Stutio's localhost web server

    10-03-2005, 5:37 PM
    Locked
    • Contributor
      4,570 point Contributor
    • danmor
    • Member since 11-04-2002, 9:48 PM
    • Bellevue, WA
    • Posts 910
    • AspNetTeam
    • Does the file webdev.webserver.exe exist in C:\Windows\Microsoft.NET\Framework\v2.0.xxxxx?
    • Is IE your default browser?  Make sure in Internet Explorer, Tools | Internet Options, Connections tab, LAN Settings, that you have 'bypass proxy server for local addresses' checked if you are using a proxy server.
    • If Windows Firewall is running check Windows Firewall settings. Turn ON the option on the Exceptions tab to "receive notifications when Firewall is running".  It's possible Firewall is blocking webdev.webserver.exe
    • What happens when you press Ctrl+F5 instead of F5 to run the site?  Ctrl+F5 is 'Run Without Debugging'
    • What do you see in your browser when you type the address http://localhost:80  ?
    -Dan
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Error Unable to connect to Visual Stutio's localhost web server

    10-04-2005, 8:50 AM
    Locked
    • Member
      334 point Member
    • Truc-Mi
    • Member since 09-16-2005, 3:21 PM
    • Posts 134

    Thank you for your response plesee see my response in Blue listed below to your questions.

    Does the file webdev.webserver.exe exist in C:\Windows\Microsoft.NET\Framework\v2.0.xxxxx?   Yes

  • Is IE your default browser?  Yes Make sure in Internet Explorer, Tools | Internet Options, Connections tab, LAN Settings, that you have 'bypass proxy server for local addresses' checked if you are using a proxy server. In the LAN Settings, my company has the Use automatic configuration script checked with the address listed as http://intranet.wcna.prd.wcus/internet_proxy.pac The Automatically detect settings is unchecked, the Use a proxy server for your LAN is unchecked, therefore the Address, Port and the Bypass prozy server for local address are unabled. Should I try uncheck the Use automatic configuration script to see if it works? if I do what Address/Port number should I be entered?
  • If Windows Firewall is running check Windows Firewall settings. Turn ON the option on the Exceptions tab to "receive notifications when Firewall is running".  It's possible Firewall is blocking webdev.webserver.exe I am not sure and assuming that our internet is goes through our company Firewall before it gets to our PC, on our PC there is no sign of any local Firewall software installed.
  • What happens when you press Ctrl+F5 instead of F5 to run the site?  Ctrl+F5 is 'Run Without Debugging' I get "The page cannot be displayed, the page you are looking for is currently unavailable...   Please try the following: Click the Refresh button, .... etc"
  • What do you see in your browser when you type the address http://localhost:80  ? I see my default Web site html page, where I used to launch to other sites.  I have a few sites built using ASP.Net using framework 1.1 on the localhost and they work.
  • I really want to start gearing toward VS2005 and will ask my company to move to that direction once I am ready; my company development team are still using VS2002 and they are located in another state, I am the only sole developer here so pretty much I am on my own here to get this going.  Any help is much appreciated.

  • Re: Error Unable to connect to Visual Stutio's localhost web server

    10-04-2005, 3:49 PM
    Locked
    • Contributor
      4,570 point Contributor
    • danmor
    • Member since 11-04-2002, 9:48 PM
    • Bellevue, WA
    • Posts 910
    • AspNetTeam

    First you need to make sure Windows Firewall is not blocking webdev.webserver.  Then you need to make sure webdev.webserver is launching correctly.  Note that Windows Firewall is a Windows Service running on your local machine and has nothing to do with your corporate firewall. 

    Go to Control Panel, and if you have SP2 you will have Windows Firewall icon.  Double-click it.  If you see an alert asking you if you want to start the Firewall Service, answer NO.  This means Windows Firewall is not running on your computer, so there is no need to start it.   If the Windows Firewall Service is running you will see a dialog with an Exceptions tab.  Make sure the option is checked to "receive notifications when Firewall is running".

    If webdev.webserver.exe exists, then when you press Ctrl+F5 you should see a new icon in the system tray that indicates the ASP.NET Development server has created a new process.  Does a new icon appear?  When you hover over it does it say "ASP.NET Development server - Port xxxx"? 

    If you don't see the icon in the tray then try to launch webdev.webserver manually.  Using a Windows command shell, navigate to the C:\Windows\Microsoft.NET\Framework\v2.0.xxxxx directory and launch it with parameters that match the location of your web files, something such as
       webdev.webserver.exe /port:8090 /path:"c:\websites\myweb1" /
    where 8090 is an unused port number on your machine, c:\websites\myweb1 is the path to the local files, and the final / (slash) is the default virtual root.  If no errors occur you should be able to navigate to http://localhost:8090 to view your web site.  One hint: make sure you have a page in your web site named default.aspx.

    -Dan
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Error Unable to connect to Visual Stutio's localhost web server

    10-04-2005, 3:50 PM
    Locked
    • Contributor
      4,570 point Contributor
    • danmor
    • Member since 11-04-2002, 9:48 PM
    • Bellevue, WA
    • Posts 910
    • AspNetTeam
    And one more thing.  You could try turning off 'automatically detect settings' in your IE Connections.  Even with that checked the above instructions should still work, but it's another thing to try.
    -Dan
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Error Unable to connect to Visual Stutio's localhost web server

    10-04-2005, 4:26 PM
    Locked
    • Member
      334 point Member
    • Truc-Mi
    • Member since 09-16-2005, 3:21 PM
    • Posts 134
    Still no luck trying all your suggestions any other ideas? Please see my settings in Blue below

    First you need to make sure Windows Firewall is not blocking webdev.webserver.  Then you need to make sure webdev.webserver is launching correctly.  Note that Windows Firewall is a Windows Service running on your local machine and has nothing to do with your corporate firewall. 
    Go to Control Panel, and if you have SP2 you will have Windows Firewall icon.  Double-click it.  If you see an alert asking you if you want to start the Firewall Service, answer NO.  This means Windows Firewall is not running on your computer, so there is no need to start it.   If the Windows Firewall Service is running you will see a dialog with an Exceptions tab.  Make sure the option is checked to "receive notifications when Firewall is running".
    My Windows Firewall if Off

    If webdev.webserver.exe exists, then when you press Ctrl+F5 you should see a new icon in the system tray that indicates the ASP.NET Development server has created a new process.  Does a new icon appear?  When you hover over it does it say "ASP.NET Development server - Port xxxx"? 
    When launching my site using Ctrl+F5 the icon does appear "ASP.NET Development Server http://localhost:1574/Sites/MySite1

    If you don't see the icon in the tray then try to launch webdev.webserver manually.  Using a Windows command shell, navigate to the C:\Windows\Microsoft.NET\Framework\v2.0.xxxxx directory and launch it with parameters that match the location of your web files, something such as
       webdev.webserver.exe /port:8090 /path:"c:\websites\myweb1" /
    where 8090 is an unused port number on your machine, c:\websites\myweb1 is the path to the local files, and the final / (slash) is the default virtual root.  If no errors occur you should be able to navigate to http://localhost:8090 to view your web site.  One hint: make sure you have a page in your web site named default.aspx.
    I also try this option by navigate to the above directory with the command line provided, and yes the ASP.NET Developer Server http://... popup, and yes I do have the default.aspx page in the site, FYI, I create the site by select File, New Site, ASP.NET Web Site, with nothing in it.  The Default.aspx is there created by VWD.

    And one more thing. You could try turning off 'automatically detect settings' in your IE Connections. Even with that checked the above instructions should still work, but it's another thing to try.
    The Automatically detect settings is Unchecked

    And ofcourse this famous error screen pop up - any other steps I can try?
    The page cannot be displayed

    The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings.

    Please try the following:

    Click the Refresh button, or try again later.

    If you typed the page address in the Address bar, make sure that it is spelled correctly.

    To check your connection settings, click the Tools menu, and then click Internet Options. On the Connections tab, click Settings. The settings should match those provided by your local area network (LAN) administrator or Internet service provider (ISP).

    See if your Internet connection settings are being detected. You can set Microsoft Windows to examine your network and automatically discover network connection settings (if your network administrator has enabled this setting).

    Click the Tools menu, and then click Internet Options.

    On the Connections tab, click LAN Settings.

    Select Automatically detect settings, and then click OK.

    Some sites require 128-bit connection security. Click the Help menu and then click About Internet Explorer to determine what strength security you have installed.

    If you are trying to reach a secure site, make sure your Security settings can support it. Click the Tools menu, and then click Internet Options. On the Advanced tab, scroll to the Security section and check settings for SSL 2.0, SSL 3.0, TLS 1.0, PCT 1.0.

    Click the



  • Re: Error Unable to connect to Visual Stutio's localhost web server

    10-04-2005, 5:37 PM
    Locked
    • Contributor
      4,570 point Contributor
    • danmor
    • Member since 11-04-2002, 9:48 PM
    • Bellevue, WA
    • Posts 910
    • AspNetTeam

    webdev.webserver.exe is launching (icon appears in system tray) which is good.  Double-click on the icon and report everything in the dialog (dialog title, physical path, virtual path, port, root URL) and what happens when you click on 'Root URL' hyperlink.

    Another thing to do is go to a command prompt and type "netstat -a" which will give you a list of all active connections on the machine.  Let me know the contents of every line in the output that contains the port number you see in the ASP.NET Development Server dialog.

    -Dan
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Error Unable to connect to Visual Stutio's localhost web server

    10-05-2005, 8:35 AM
    Locked
    • Member
      334 point Member
    • Truc-Mi
    • Member since 09-16-2005, 3:21 PM
    • Posts 134

    Here is what I got when click o the icon:
    Dialog title: ASP.NET Development Server - Port 1158
    Run ASP.NET applications locally
    Physical Path: C:\Sites\WebSite1\
    Virtual Path: /WebSite1
    Port: 1158
    Root URL: http://localhost:1158/WebSite1

    If I click on the URL link I got that error page:
    The page cannot be displayed

    The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings.

    try the following:

    Click the Refresh button, or try again later.

    If you typed the page address in the Address bar, make sure that it is spelled correctly.

    To check your connection settings, click the Tools menu, and then click Internet Options. On the Connections tab, click Settings. The settings should match those provided by your local area network (LAN) administrator or Internet service provider (ISP).

    See if your Internet connection settings are being detected. You can set Microsoft Windows to examine your network and automatically discover network connection settings (if your network administrator has enabled this setting).

    Click the Tools menu, and then click Internet Options.

    On the Connections tab, click LAN Settings.

    Select Automatically detect settings, and then click OK.

    Some sites require 128-bit connection security. Click the Help menu and then click About Internet Explorer to determine what strength security you have installed.

    If you are trying to reach a secure site, make sure your Security settings can support it. Click the Tools menu, and then click Internet Options. On the Advanced tab, scroll to the Security section and check settings for SSL 2.0, SSL 3.0, TLS 1.0, PCT 1.0.

    Click the

    When I type in the command netstat -a here is what I have

    Active Connections

    Proto     Local Address                     Foreign Address                                   State

    TCP      USLCNU33608T2: 1158   USLCNU33608T2.int.dir.willis.com:0   LISTENING




  • Re: Error Unable to connect to Visual Stutio's localhost web server

    10-05-2005, 12:44 PM
    Locked
    • Contributor
      4,570 point Contributor
    • danmor
    • Member since 11-04-2002, 9:48 PM
    • Bellevue, WA
    • Posts 910
    • AspNetTeam
    Everything looks as expected so far as the correct process being launched, a virtual root being created, and a port opened for LISTENING as verified by netstat.  What's puzzling is that you can view your own machine port 80, but not any other port you create.  I'll have to ask my colleagues if they have ever seen this because I haven't.  One thing you could try is using IIS Manager to stop the IIS server, then launch a new file system web on port 80.  You can do this by selecting the root of the web in Solution Explorer, and in the Properties window set 'Use dynamic port' to False and set the port at 80.  See if the web site displays. 

    Another thing to verify is the IP address for Localhost in your hosts file (it has no file extension, just open in Notepad but don't save any changes).  Find it in c:\windows\system32\drivers\etc\hosts.  The IP address should be 127.0.0.1 but maybe it has been redirected to another IP.  I doubt it since machinename:80 works for your Local IIS, but it's still something to check.
    -Dan
    This posting is provided "AS IS" with no warranties, and confers no rights.
Page 1 of 4 (53 items) 1 2 3 4 Next >