I throw an error in my REST service like:
throw new WebFaultException<String>("bla bla bla",
HttpStatusCode.HttpVersionNotSupported);
but when I try to get the error content in
var r = (HttpWebResponse)(request.GetResponse());
if (r.StatusCode != HttpStatusCode.OK) {...
The problem is that GetResponse() throws a WebException error. And it is impossible for me to get the "bla bla bla" text. How can I get this text? The web exception contains the status code HttpVersionNotSupported but no property that contains the text "bla bla bla". Where is the data I send as first parameter of WebFaultException?