Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8565481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:26:12+00:00 2026-06-11T17:26:12+00:00

I have stumbled across an insane behavior of WebClient where it throws WebException on

  • 0

I have stumbled across an insane behavior of WebClient where it throws WebException on 404 code.

This behavior is wrong because the 404 code can be returned with content data like in the case of Facebook: https://graph.facebook.com/sadfsa.dsadsasadsa

So this code throws an exception

 var json = webClient.DownloadString("https://graph.facebook.com/sadfsa.dsadsasadsa");

How do I read the json returned by 404 Facebook?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:26:13+00:00Added an answer on June 11, 2026 at 5:26 pm

    I don’t think that WebClient has insane behavior. Try to catch WebException and read webException.Response.GetResponseStream

    See a similar question: C# WebException how to get whole response with a body?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have stumbled across this insane behavior where image.onload gets fired multiple times instead
I'm quite new to hibernate and have stumbled on this problem, which I can't
I was browsing my teacher's code when I stumbled across this: Order* order1 =
I'm trying to truncate some text in PHP and have stumbled across this method
I have some code that parses through an html file and I stumbled across
I just stumbled across this bug in some legacy code: class MyAPIHandler { private:
I have stumbled across some code that is adding strings to a List but
I have stumbled across a bit of code that I was hoping someone could
I stumbled across a strange behavior in Firefox. I have a dynamically created text,
I have stumbled across this website : http://www2.research.att.com/~bs/C++0xFAQ.html#lambda where they explain lambda functions .

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.