I need to be able to distinguish http 302 redirects from my code that use .net remoting.
In order to connect to the appropriate url we try them in order until one works. In most environments the first url correctly fails with a System.Net.WebException with a status of WebExceptionStatus.NameResolutionFailure. For Customers that use OpenDNS, however this comes back as a HTTP 302 response that redirects to their Guide page. Because I am using .net Remoting the redirect is ignored, and the error I recieve is a System.Runtime.Serialization.SerializationException that is only distinguishable by its message "End of Stream encountered before parsing was completed."
Here's the opendns http response: HTTP/1.0 302 Found Location: http://guide.opendns.com/?url=demonstration.totallyinvalidexceptonmynetwork.com%2Fi%2Fdo%2Fnot%2Fexist.html Content-type: text/html Content-Length: 0 Connection: close Date: Thu, 28 May 2009 20:46:26 GMT Server: OpenDNS Guide