Reputation: 1
I used google map static api to get map image, but I got an error "The remote name could not be resolved:'maps.googleapis.com'" when executing using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
.
But I can got image of google map in windows application(same code with web application), I don't know what happened
Upvotes: 0
Views: 1424
Reputation: 98
This thing is happen due to proxy setting in your system.Please add this code in your web.config file and it will work.
<system.net>
<defaultProxy enabled="true" useDefaultCredentials="true">
</defaultProxy>
</system.net>
Upvotes: 3
Reputation: 98
I also faced same issue. If you are connected with local area network and protected by Proxy server then Go in google chrome settings. Our system takes default settings from google chrome. In settings of chrome, go in proxy settings.Click on Lan setting.Click on proxy setting checkbox and click as well on by pass proxy server for local addresses.Also fill details of your proxy server in textbox. Go in advance and in exceptions field type localhost.Run project again.It will work.
Upvotes: 0
Reputation: 6684
The problem can go from invalid url (hostname) to your firewall or proxy blocking the request or even misconfigured host file or DNS.
Upvotes: 0