This is a problem I encountered in the ArcGIS Server Web MAP Application project.
When F5 compiled to run the project, the page was automatically opened using localhost. You must change the localhost to a native IP address before you can access it.
The feeling is unable to parse localhost, the internet searches is can parse localhost, but cannot parse IP. The Hosts file under Windows/system32 needs to be modified.
(backed up under WINDOWS/SYSTEM32/DRIVERS/ETC)
Then I thought about it, this machine is connected to the Internet using a proxy server. It is set in IE. but the visit to the local Web site is also to ask the agent. Open the connection in IE Internet properties. Turn on LAN settings and discover that there is a checkbox under Proxy server that does not use proxy server for local addresses No choice. Check this option. OK save. Re-allow VS project, everything OK.
Solution:
Select the Ie-tool-internet Properties-Connection-LAN settings-Proxy server-do not use proxy server for local addresses check box.