Is there any to make sure that DNS errors has been occurred after getting WebException in the following code?
WebRequest request = WebRequest.Create(uri);
....
WebResponse response = request.EndGetResponse(asyncResult);
String comparison might be one way. By checking the error message we can be sure. But depending on culture the message string can vary. So this may not be the best way for checking DNS error.