Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
504 views
in Technique[技术] by (71.8m points)

visual studio 2010 - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...