-1

I have 2 questions on this

  • My code always seems to hit a 401 forbidden error when I try to post data to a http link
  • What is the best way to pull back and display xml data from the stream that I should be getting back?
Linger
  • 14,942
  • 23
  • 52
  • 79
kevinw
  • 103
  • 1
  • 2
  • 12
  • Much more detail on the server and there is no way to answer the "best way to display" question without knowing what is required from the display. – AnthonyWJones May 22 '09 at 13:15
  • some snippets of the code in question would help to determine what the problem may be, please provide some examples – curtisk May 22 '09 at 13:15

1 Answers1

0

My guess regarding your first question: Your "401 Forbidden" is actually a "401 Unauthorized" ("Forbidden" would be a fatal error, and it has code 403). This 401 response is a normal part of the NTLM (Windows-integrated) challenge/response authentication mechanism. Your request must have correct credentials attached so it can authorize itself, then this error will go away.

Regarding your second question — It depends. What XML do you get back? Will displaying the raw XML string be useful?

Tomalak
  • 332,285
  • 67
  • 532
  • 628
  • as far as im aware the Credentials are correct this is why i am supposed to be getting back Success AB05 CDE 206706046 Driving 53.728427778 -1.462761111 – kevinw May 22 '09 at 13:59
  • 1
    Problem is tho that the error you are getting indicates the credentials either are not correct, or they are not being passed as expected. For displaying your XML you will most likely want to parse it to display it back in a way that is meaningful. – David Yancey May 22 '09 at 14:12