I have an ASP MVC controller action. I'm trying to make a web request
public ActionResult Index()
{
WebRequest request = HttpWebRequest.Create("http://www.some-internet-address.com");
WebResponse response = request.GetResponse();
string str = response.ToString();
}`
I get a "WebException occured" the remote name could not be resolved: 'www.some-internet-address.com'
If I start Fiddler, then the webrequest works.
I tried adding:
<system.net>
<defaultProxy>
<proxy usesystemdefault ="True" bypassonlocal="True" />
</defaultProxy>
to Web.config (with and without hte bypassonlocal) and it still doesn't work.
Any suggestions?