Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Localhost not working in chrome and firefox

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?

like image 565
san Avatar asked Aug 29 '11 08:08

san


People also ask

Why localhost is not opening in Chrome?

Go to chrome://flags and set "Built-in Asynchronous DNS" to "Disabled", then restart the browser. This allows all local domains to be accessed. Looks like DNS was just choking up the issue.

Why is my localhost not working?

What Is the Localhost Refused to Connect Error? The localhost simulates a web server running on your computer. When the “localhost refused to connect” error appears, it is likely due to misconfigured port. Other common reasons include insufficient permissions and the Apache webserver not running properly.

How do I enable localhost in Chrome?

1) Open Google Chrome browser. 2) Type chrome://flags/#allow-insecure-localhost in address bar. 3) Click on Enable. 4) Select "Relaunch Now" option displaying at the bottom after making the changes OR Re-open the chrome browser.


2 Answers

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)

like image 175
san Avatar answered Sep 28 '22 10:09

san


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. :)

like image 27
Mr_Green Avatar answered Sep 28 '22 09:09

Mr_Green