Localhost not working in chrome and firefox

165,774

Solution 1

Finally I found the solution ... It's very easy

  1. Go to the LAN settings (In Chrome : Tools -> Options -> Under the hood -> Change Proxy setting -> LAN Setting)

  2. There will be a checkbox for "Bypass proxy server for local address"

  3. Tick the checkbox.

Done!

On Mac/Apple: Chrome uses system preferences for localhost exclusion:

  1. Go to System Preferences -> Network -> advanced -> Proxy settings

  2. Add 'localhost' at the bottom where it says: 'ignore proxy settings for these hosts and domains' (Exceptions are separated by a comma)

Solution 2

For all browsers,

  • Open internet Options (or Internet properties)
  • Go to connections tab
  • Click on LAN Settings
  • Tick Use proxy server for your LAN
  • Tick Bypass proxy server for your local address (Don't change the port number)
  • Click on Ok

Now you are good to go. :)

Solution 3

I faced the same issue and the complete solution is to set to false(uncheck) the "Automatically detect settings" checkbox from Lan Area Network( the same window as for Bypass proxy server for local address )

Solution 4

If you are using windows system:

please check the file

C:\Windows\System32\drivers\etc\hosts

and add line such as:

127.0.0.1 localhost

Solution 5

For Chrome go to

Settings->Network->Change Proxy setting

Now Internet properties will open so you need to go LAN settings and click on check box :

Bypass proxy server for local address

Share:
165,774
san
Author by

san

Updated on October 23, 2020

Comments

  • san
    san over 3 years

    I am doing a web project using visual studio 2010(MVC3 Razor) and Windows 7.

    My default browser is IE. When I run the project, the website working is perfectly with the url

    http://localhost:49824/

    When I copy the same url and try to run the website in Chrome or Firefox it shows me the following error.

    ERROR

    The requested URL could not be retrieved    
    The following error was encountered while trying to retrieve the URL: http://localhost:49824/    
    Connection to 127.0.0.1 failed.    
    The system returned: (111) Connection refused    
    The remote host or network may be down. Please try the request again.    
    Your cache administrator is webmaster.
    

    I have rebuilt the solution and added the url to allowed site. But still the problem persists. How should I solve this problem?

  • SMUsamaShah
    SMUsamaShah over 11 years
    where is the firefox solution?
  • Tom
    Tom over 10 years
    about:config > set "browser.urlbar.trimURLs" to false worked for me.
  • Relequestual
    Relequestual over 9 years
    IN FF, under advanced, network, settings, change proxy to manual (you'll have to know what your proxy details are), and then add 127.0.0.1 to the "no proxy for" list.
  • Jon Onstott
    Jon Onstott about 9 years
    While this should work, it seems like it is masking over a larger issue
  • Nikos Tsokos
    Nikos Tsokos almost 8 years
    Windows 10 - VS 2013, same issues, this is the only thing that worked.
  • Joshua Duxbury
    Joshua Duxbury over 7 years
    Chrome uses your local internet settings. So go to Internet Options > Connections > Lan Settings - and click Bypass Proxy Server.
  • Mauro Bilotti
    Mauro Bilotti over 7 years
    Worked for me as well!! Thanks a lot!!
  • Arif Acar
    Arif Acar almost 7 years
    this is worked for me. wrong proxy settings affected my postman requests too.
  • Code Doggo
    Code Doggo almost 3 years
    Proxy settings are no longer controled in Chrome it seems like. I can't find this option anymore and searching for "Proxy" in the chrome settings just opens up the Windows proxy settings from Settings app.
  • Code Doggo
    Code Doggo almost 3 years
    This guide is heavily out of date and is not reflective of the current situation anymore with Chrome.