从 Silverlight 3.0 发出 HttpRequest 时,我无法设置任何 HTTP 标头值?
Silverlight 3.0 是否支持 HTTP 标头?
以下代码在调用请求回调时抛出异常:
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);
异常类型是 System.NotSupportedException - WTF!
有人有什么想法吗?
干杯
AWC