IE won't connect to asp.net server.

Last post 06-19-2009 1:41 PM by Preston B. 5 replies.

Sort Posts:

  • IE won't connect to asp.net server.

    06-18-2009, 8:16 PM
    • Member
      1 point Member
    • dkemper
    • Member since 06-19-2009, 12:08 AM
    • Posts 2

     Every time I try to run my application on the built in ASP.NET server IE fails to connect and returns this error:

     Internet Explorer cannot display the webpage

     I have tried reinstalling Visual Web Developer 2008 Express using the repair setting with no change. The ASP.NET server loads and is running when I attempt to run my application. The local port number matches between the IE address and the server. Sad

     Can anybody help?

     

    Dave K.

     

     

  • Re: IE won't connect to asp.net server.

    06-18-2009, 10:00 PM

    Can't say for sure that this is the problem, but try right clicking on your "main" aspx file, and select "Set as Start Page".

  • Re: IE won't connect to asp.net server.

    06-19-2009, 11:21 AM
    • Member
      117 point Member
    • Guy0510
    • Member since 10-27-2006, 12:01 PM
    • Halifax, NS
    • Posts 31

    Try commenting out this line in your Hosts file:

    ::1             localhost

    Guy Lapierre
    Forefront Business Solutions
    Automotive Shop Management
    www.forefrontbusinesssolutions.com
  • Re: IE won't connect to asp.net server.

    06-19-2009, 11:54 AM
    Answer
    • Member
      574 point Member
    • Preston B
    • Member since 07-14-2008, 11:21 PM
    • Posts 123

    Dave,

    You don't mention your OS. If it is Vista, 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 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 reboot your machine.

    Try to open the page(s) that were giving you the 404 error.

    -Preston

    Preston Birdwell
    Columbia, CA USA
  • Re: IE won't connect to asp.net server.

    06-19-2009, 12:57 PM
    • Member
      1 point Member
    • dkemper
    • Member since 06-19-2009, 12:08 AM
    • Posts 2

     Thanks Preston.

    The hosts file had an entry: 

    ::1         localhost

    I made the change you suggested and the built in server is now able load my applications in IE. Reboot was not needed. By the way, I'm running Vista Home.

     Dave K.

     

  • Re: IE won't connect to asp.net server.

    06-19-2009, 1:41 PM
    • Member
      574 point Member
    • Preston B
    • Member since 07-14-2008, 11:21 PM
    • Posts 123

    Dave,

    I'm glad this worked for you!

    Please mark my reply as "Answer". This helps others who may have the same issue.

    -Preston

    Preston Birdwell
    Columbia, CA USA
Page 1 of 1 (6 items)