The Microsoft System.Net.Browser.ClientHttpWebRequest appears to be throwing a WebException with a status code of NotFound, which corresponds to a 404 response by the server, when accessing an invalid IP address at which there is no server running. The correct response is not an HTTP status code and definitely not in the 400-range, since the client library never had an opportunity to speak with a valid HTTP server. This is problematic for my code, because 404 has a special meaning when returned by my server endpoint.
Is there a way to determine when a 404 (NotFound) response was actually returned by the server vs. being used incorrectly to describe a general connectivity failure with the System.Net.Browser.ClientHttpWebRequest class?
Note that this behavior occurs for me on WP8.