Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void GetSearchResponse(HttpWebRequest httpWebRequest)
- {
- try
- {
- using (var httpWebResponse = httpWebRequest.GetResponse() as HttpWebResponse)
- {
- using (var stream = httpWebResponse.GetResponseStream())
- {
- ProcessSearchResponse(stream);
- }
- }
- }
- catch (WebException ex)
- {//catch and log the error
- }
- stack trace : "{"error":{"code":"-2147024891,
- System.UnauthorizedAccessException","message":{"lang":"en-US","value":"Access
- denied. You do not have permission to perform this action or access
- this resource."}}}"
- [MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was ''.]
- request.Headers["X-RequestDigest"] = formDigestValue;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement