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?
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.
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.
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.
Finally I found the solution ... It's very easy
Go to the LAN settings (In Chrome : Tools -> Options -> Under the hood -> Change Proxy setting -> LAN Setting)
There will be a checkbox for "Bypass proxy server for local address"
Tick the checkbox.
Done!
On Mac/Apple: Chrome uses system preferences for localhost exclusion:
Go to System Preferences -> Network -> advanced -> Proxy settings
Add 'localhost' at the bottom where it says: 'ignore proxy settings for these hosts and domains' (Exceptions are separated by a comma)
For all browsers,
internet Options
(or Internet properties) connections
tabLAN Settings
Use proxy server for your LAN
Bypass proxy server for your local address
(Don't change the port number)Ok
Now you are good to go. :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With