Hi,
When I try to set the header properties on a WebRequest object, I get the following exception
This header must be modified using the appropriate property
I've tried modifying the .Headers propery and adding them that way like so
webRequest.Headers.Add(HttpRequestHeader.Referer, "http://stackoverflow.com");
But still getting exceptions. I can get around this by casting the WebRequest object to a HttpWebRequest and setting the properties such as httpWebReq.Referer ="http://stackoverflow.com"
But I'd like to know if there's a way to get a finer grained control over modifying headers with a request for a remote resource.
Thanks