I asked a similar question there but for curl and webclient.
I found the answer for curl:
How to ensure that webclient/curl process 503 error like they process 200
CURLOPT_FAILONERROR
I want something like that but for webclient rather than for curl
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The way each question is asked, probably means this question is a duplicate of the one linked to in this question. In any case I provide the same answer here as I did there:
For
WebClientyou need to process theWebException.Response. E.g. this LINQPad query dumps the HTML provided by my web server’s “Not Found” error web page: