On the client when using GZipWebClient and throwing an error on the server like so:
return new HttpResponseMessage(HttpStatusCode.NotAcceptable);
the error message on the client always fails with the below on this line:
WebException we = (WebException)e.Error;
HttpWebResponse response = (System.Net.HttpWebResponse)we.Response;
Message:
InnerException = {System.NullReferenceException: Object reference not set to an instance of an object.
at System.Net.WebClient.DownloadBitsState.SetResponse(WebResponse response)
at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)}
Message = "An exception occurred during a WebClient request. "
This work fine when using standard WebClient, is there some other way I to successfully get the HttpWebResponse ?
On the client when using GZipWebClient and throwing an error on the server like so:
return new HttpResponseMessage(HttpStatusCode.NotAcceptable);
the error message on the client always fails with the below on this line:
WebException we = (WebException)e.Error;
HttpWebResponse response = (System.Net.HttpWebResponse)we.Response;
Message:
InnerException = {System.NullReferenceException: Object reference not set to an instance of an object.
at System.Net.WebClient.DownloadBitsState.SetResponse(WebResponse response)
at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)}
Message = "An exception occurred during a WebClient request. "
This work fine when using standard WebClient, is there some other way I to successfully get the HttpWebResponse ?