C# Accessing XML feed only works if fiddler is running



I am trying to understand why a simple call to a feed works only when I have fiddler open.


Ive looked at the below links, but none of the answers seem to apply:


HttpWebRequest doesn't work except when fiddler is running


HttpWebRequest only works while fiddler is running


http://ift.tt/Mumqqa


My code is very simple, and as far as I can see, it should just fill the variable with the contents of the xml file:



using (var client = new WebClient())
{
text = client.DownloadString(path);
}


Note that this works perfectly if I am running fiddler, but fails with a timeout error (?) if I run it while fiddler is not running.


I can access the path to the xml file directly from my broswer - so permissions/access does not appear to be a problem either.


Does anyone have any idea why this might be?


No comments:

Post a Comment