Re: How can I get Http Status Code?

From: Jon Skeet [C# MVP] (skeet_at_pobox.com)
Date: 02/11/04


Date: Wed, 11 Feb 2004 16:29:30 -0000

Jon Maz <jonmaz@surfeu.de.no.spam> wrote:
> Exactly right - but the StatusCode property is in the HttpWebResponse, not
> in the Exception!
>
> Any ideas?

The WebException will contain a WebResponse.

-- 
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too


Relevant Pages

  • Re: How can I get Http Status Code?
    ... > Exactly right - but the StatusCode property is in the HttpWebResponse, ... > in the Exception! ... The WebException will contain a WebResponse. ...
    (microsoft.public.dotnet.framework)
  • Re: How can I get Http Status Code?
    ... > Exactly right - but the StatusCode property is in the HttpWebResponse, ... > in the Exception! ... The WebException will contain a WebResponse. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Download file
    ... StatusCode property to see if the file exists or not (if it doesn't, ... My problem is that, I need to know if the> file exists before issuing the GetResponse() call, because it throws> WebException. ... I can of course handle the exception but it's not the best> way ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How can I determine WHICH exception I got in my CATCH?
    ... exception, and I wanted to know exactly WHICH exception it was so that I ... Larry Woods ... > Catch ex As WebException When TypeOf ex.Response Is HttpWebResponse ...
    (microsoft.public.dotnet.languages.vb)
  • Re: How can I get Http Status Code?
    ... Exactly right - but the StatusCode property is in the HttpWebResponse, ... in the Exception! ... JON ...
    (microsoft.public.dotnet.framework.aspnet)