Iain Hodgen
asked on
C# .NET HttpWebResponse Read the content when an error is returned
I am error trapping a json call error in .NET.
Documentation says this would be the response on error:
Error Response Code: 401 Unauthorized
Content: {"connection":"Error","mes sage":"Ple ase check the following; a) the credentials you have provided are correct, b) the IP address you are requesting from is authorised, c) your account is not suspended."}
Question is I can see the Code: 401 Unauthorized error but cannot get the content (a,b,c) with the details of what happen to cause the auth error.
Can this be done in .NET?
Documentation says this would be the response on error:
Error Response Code: 401 Unauthorized
Content: {"connection":"Error","mes
Question is I can see the Code: 401 Unauthorized error but cannot get the content (a,b,c) with the details of what happen to cause the auth error.
Can this be done in .NET?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I have recommended this question be closed as follows:
Accept: Ryan Chong (https:#a42138443)
If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.
frankhelk
Experts-Exchange Cleanup Volunteer