locked
VWD 2008 + Vista Localhost not working RRS feed

  • Question

  • User380413204 posted

    Hi,

    I have VWD 2008 Express Edition in combination with Vista on two boxes, both with the same problem.

    This is what I try to do:

    • Starting with the option File, New Web SIte...ASP.NET Web Site
    • Trying to show Default.aspx by clicking the Button: Show in Browser

    This results in Page cannot be displayed.

    No doubt it must be something simple as more people would have tried this, but not for me I'm afraid.

    Thanks,


     

     

     

     

    Friday, January 25, 2008 12:59 PM

Answers

  • User1087565669 posted

    I had this problem and was able to resolve -but i am not overly happy with the way i had to fix it ...

    go to your hosts file and comment out the ::1    (the "::1" is use for the localhost for ipv6)

    127.0.0.1       localhost
    ::1             localhost  <--- comment out this line        #::1

     

    I am not sure if this is a vs2008 thing or a vista thing

    if anyone finds out then please let me know

    Pete

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 4, 2008 4:23 PM

All replies

  • User987997965 posted

    Does this happen when you hit Shift F5 or F5?  Does it happen if you right click on the Document and select 'View in Browser' from the context menu?

    Did you set the site up to run on the FileSystem (Cassini) or in IIS?

    Friday, January 25, 2008 1:33 PM
  • User380413204 posted

    Hi,

    It happens right after I installed the program and exactly following my steps from the first post.

    No further steps taken, so the file system.

    View in Browser Context Menu isn't that the same Option as I described?

     

     

    Friday, January 25, 2008 1:54 PM
  • User987997965 posted

    Just trying to eliminate possiblities.  If all of the other methods displayed your page correctly, then there could be an issue (bug) with VWD and that particular button.  Have you tried to view the page using the other methods i have described?

    Friday, January 25, 2008 2:07 PM
  • User380413204 posted

    Hi,

    And i appreciate that!

    No, all ways lead to the same problem. Localhost is simply not working

    I thought it could have something to do with Intranet Settings as thas is what VWD starts about just after install on XP

    But I think I have tried all sorts of security options in Vista

     

    Thanks,

    Lx

    Friday, January 25, 2008 2:12 PM
  • User987997965 posted

    Well if you are using the FileSystem as your web host then LocalHost really has nothing to do with it.  I run VWD 2008 on Vista Business at home and I did not have any issues.  Of course I am the administrator of the PC so I don't have any security issues. 

    What do you mean by this:

    I thought it could have something to do with Intranet Settings as thas is what VWD starts about just after install on XP

    Friday, January 25, 2008 2:19 PM
  • User380413204 posted

    Well perhaps I misunderstood.

    I make the Website somewhere on C:

    When I try to view Default.aspx I see a little window in System tray saying:

    ASP.NET Development server

    Http://Localhost:50212/xxx

    In the Browser I get the problem

     

     

    Friday, January 25, 2008 2:41 PM
  • User380413204 posted

    Perhaps this can clarify things a little bit.

    I just found out that when I choose View with Internal Browser all goes well.

    When I choose Default (IE7) it errors out.

     

    Friday, January 25, 2008 4:22 PM
  • User987997965 posted

    Sorry about the late response, gut hung up on some things.

    Ok, I can not reproduce your error in VWD using the method you described earlier. 

    Couple of things, in your web.config do you have this line:

    <compilation debug="true">

     and also do you have the CustomErrors tag set to "Off"? 

    Have you tried accessing the site from directly in IE as opposed to clicking view in browser? (The development server must be running which is denoted by the icon in your system tray)

    Friday, January 25, 2008 9:43 PM
  • User-372731232 posted

    Hello,

     I was checking for the same solution. I have been running VWD 2008 Express on a Windows XP machine since mid December and things operate correctly. I also installed it on my wife's PC which is running Vista Home Premium. Neither installations reported any problem. Everything runs the same on both machines except when she is ready to test the site. In both cases either using F5 or Ctrl-F5 you can see the local host server open in the tray, but the browser receives a can not access local host and the website address. On the XP machine the browser opens the website and runs as if it were on the internet.

     
    I thought maybe it was an Intranet security problem also as my wife's e-mail address comes up on the Webmaster hotlink on the error message.

     

    Of course this means she can not open the webconfig tool either as it runs on a local host. It can't be the code for her website as an empty Aspnet website will not display either.
     

    Friday, January 25, 2008 10:21 PM
  • User380413204 posted

    Yes, this sounds like the same problem exactly.

    The option to use the Internal browser sort of solves the problem as far as that I can at least use VWD on Vista.

     

    Saturday, January 26, 2008 3:25 AM
  • User-372731232 posted

     I tried changing the browser options and changing my default browser to the internal browser. I see it still opens a local host, but it actually operates similar to the way it would operate on my XP machine. I checked the XP computer and I have it set to operate with Firefox as the default browser, which is the way my wife's machine had been set.

     

    Would this mean that I should have looked at the options in the browsers for a security block? I haven't attempted to use any of the debug features yet, and I am constantly hearing that websites display differently in different browsers, so should I really continue to pursue another answer? I noticed the internal browser brings up an Explorer window and I had changed her default browser to Explorer once on Vista and had the same problem viewing the site. However that was done on Vista and not in VWD.

    Chuck 

    Saturday, January 26, 2008 8:35 AM
  • User575795868 posted

    Does disabling the windows firewall make any difference ?

    Saturday, January 26, 2008 8:47 AM
  • User380413204 posted

    No, I tried security settings of IE (and completely disabled Firewall), it had no effect.

    Chuck:

    The Internal Browser opens the Website. I's just that browserwindow runs inside VWD.

    I prefer that it runs in IE7  (like on my other computer which runs on XP with VWD)

    How your site appears in different browsers has a lot to do with how you program your stuff (CSS and so on)

     

     

     

    Saturday, January 26, 2008 10:18 AM
  • User-372731232 posted

     I checked my wife's machine and her Firewall was turned off. We recently installed Norton 360, but this was occurring before and after that installation.

     
    Is using the browser to access the local host considered an intranet connection or does the browser treat it as if it were an internet connection?

    Chuck
     

    Saturday, January 26, 2008 8:33 PM
  • User1087565669 posted

    I had this problem and was able to resolve -but i am not overly happy with the way i had to fix it ...

    go to your hosts file and comment out the ::1    (the "::1" is use for the localhost for ipv6)

    127.0.0.1       localhost
    ::1             localhost  <--- comment out this line        #::1

     

    I am not sure if this is a vs2008 thing or a vista thing

    if anyone finds out then please let me know

    Pete

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 4, 2008 4:23 PM
  • User380413204 posted

    Hi,

    In my search for a solution i read somewhere about this ipv6.

    How do I get to that hostfile exactly?

    http://localhost:50323/lex/ is what the addressbar shows me.

    Found it: (google ....[:$])

    C:/windows/system32/drivers/etc 

    Tnx

    Tuesday, February 5, 2008 10:13 AM
  • User-1611072895 posted

     Hi,
    You really made my day guys, i had the same problem , not any more , cheers [:)]

    Saturday, March 15, 2008 11:16 AM
  • User-96674886 posted

    Did you solve the problem. It appears as though I have same problem with Visio 2008 and Vista. My browser can not display the website. Vista is not open.  What do I do.

    Friday, July 11, 2008 2:15 PM
  • User1563696506 posted

    This solution involving removing the dodgy line in the %windows%/system32/drivers/etc/hosts file resolved my issue.

     I have several questions however...

     1.  Why is it so hard to find resolution to this problem on these forums?

    2. Why is there on official line from Microsoft about this?

    3. How did this IPv6 localhost entry get into my hosts file, because one moment my site was running and the next it wasn't?

    4. When is the planned fix for the development web server that resolves this issue without people having to manually fiddle around with hosts settings?

     Anyway, thanks for the tips guys - without you I would have wasted another two days or so fumbling around googling for the answer.  It's only a shame that Microsoft cannot admit to these problems in a more prominent fashion in the online MDSN documentation

    Tuesday, March 10, 2009 5:01 PM
  • User1460695236 posted

    The same problem happened to me too. I'm thinking that one of the recent Windows Updates changed this on localhost
    (and I'm really trying to understand why this step was deemed necessary by Microsoft, because it makes no f***ing sense to me)

     

    Thanks for the tips, ppl! Very helpful!

    Wednesday, March 11, 2009 8:53 AM
  • User-2105477810 posted

    Great solution to problem buddy ..... nw just tel me where u got dis trick ..??? u r genius buddy .... keep posting solution n best luck for ur future ..

    Sunday, December 20, 2009 9:05 AM
  • User-1303760475 posted

    An automatic update or certain virus protection apps may have made a change to your 'hosts' file.

    Your "hosts" file is what tells your computer that "localhost" should map to "127.0.0.1" so here is where your file is:

        C:\WINDOWS\system32\drivers\etc\hosts

    Close Visual Web Developer and any browser that is open.

    Locate the 'hosts' file using Windows Explorer

    Open that file in Notepad under a 'computer administrator account'. The following entry should be present. If it is not, or does not look like the following, add or edit the entry:

        127.0.0.1       localhost

    Save the file and try again.

    -Preston

    Monday, December 21, 2009 10:50 AM
  • User-423615993 posted


    computer administrator account

    <meta charset="utf-8">

    Great help Preston - it solved my problem.

    Just one thing. As I was logged in as an administrator, I thought I'd automatically be using Notepad under a 'computer administrator account', but it wouldn't let me save the file.

    The solution was to launch Notepad by clicking right on Notepad and selecting "Run as administrator", then open the hosts file using the File/Open menu.

    - Keith

    Thursday, December 2, 2010 3:05 AM
  • User2028940440 posted

     Thanks Preston

     

    great help....

    Saturday, December 11, 2010 10:47 AM