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 4233902
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:16:48+00:00 2026-05-21T02:16:48+00:00

I am making an API call to a REST service. The REST service returns

  • 0

I am making an API call to a REST service. The REST service returns an XML string that contains a user token if the password submitted is correct, or an XML string with data if it isn’t.

Here is an example if the password is incorrect:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<authenticationResponse>
  <statusCode>403</statusCode>
  <errors>
    <error>
       ....
    </error>
  </errors>
  <timestamp>2011-03-31 22:45:03 GMT</timestamp>
</authenticationResponse>

With this code below, it appears .NET is translating this to an actual error. I still want it to read the XML data and ignore any error:

RequestData requestData = (RequestData)result.AsyncState;
HttpWebResponse response = 
                 (HttpWebResponse)requestData.Request.EndGetResponse(result);

How I can ignore the error but still create the stream to read the XML?

  • 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-05-21T02:16:49+00:00Added an answer on May 21, 2026 at 2:16 am

    Catch WebException, check the exception status, read the response. See these questions for examples:

    • Catching a specific WebException (550)
    • WebException when reading a WebException's response stream
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making an ajax call to a rest API and specified the following header
I am making a GET request to a REST API using PHP to call
I tried reading the REST api for call making over and over again but
I am making a analytics system, the API call would provide a Unique User
I'm making use of an API on the internet that is marshalling objects to
I'm making an application in Win32 API that uses the modern Ribbon style UI.
I have a rails app that makes web api call , the rails app
I am calling an external REST service (Vimeo REST API). The response of the
I've been contacted by Facebook noting that the auth.promoteSession REST API is being deprecated
Let say client side making the first call the my API . How I

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.