I'm having trouble setting any HTTP header values when making a HttpRequest from Silverlight 3.0?
Are HTTP Headers supported in Silverlight 3.0?
The following code throws an exception when the request callback is called:
var url = new Uri("http://lonmw32795/RBSM_Portal_RESTfulWebService/HostInterrogationService.svc/host/environment");
req = (HttpWebRequest)WebRequest.Create(url);
req.Headers[HttpRequestHeader.Pragma] = "no-cache";
req.Method = "GET";
req.BeginGetResponse(new AsyncCallback(WebComplete), req);
The exception type is System.NotSupportedException - WTF!
Anyone got any ideas?
Cheers
AWC