InternalProcessHttpErrorResponse method

void InternalProcessHttpErrorResponse(
  1. IEwsHttpWebResponse httpWebResponse,
  2. WebException webException,
  3. TraceFlags responseHeadersTraceFlag,
  4. TraceFlags responseTraceFlag,
)
Processes an HTTP error response The HTTP web response. The web exception. The trace flag for response headers. The trace flag for responses.

Implementation

void InternalProcessHttpErrorResponse(
    IEwsHttpWebResponse httpWebResponse,
    WebException webException,
    enumerations.TraceFlags responseHeadersTraceFlag,
    enumerations.TraceFlags responseTraceFlag) {
//            EwsUtilities.Assert(
//                httpWebResponse.StatusCode != HttpStatusCode.InternalServerError,
//                "ExchangeServiceBase.InternalProcessHttpErrorResponse",
//                "InternalProcessHttpErrorResponse does not handle 500 ISE errors, the caller is supposed to handle this.");

  this.ProcessHttpResponseHeaders(responseHeadersTraceFlag, httpWebResponse);

  // Deal with new HTTP error code indicating that account is locked.
  // The "unlock" URL is returned as the status description in the response.
  // todo("implement account lock check")
//            if (httpWebResponse.StatusCode == ExchangeServiceBase.AccountIsLocked)
//            {
//                String location = httpWebResponse.StatusDescription;
//
//                Uri accountUnlockUrl = null;
//                if (Uri.IsWellFormedUriString(location, UriKind.Absolute))
//                {
//                    accountUnlockUrl = new Uri(location);
//                }
//
//                this.TraceMessage(responseTraceFlag, string.Format("Account is locked. Unlock URL is {0}", accountUnlockUrl));
//
//                throw new AccountIsLockedException(
//                    string.Format(Strings.AccountIsLocked, accountUnlockUrl),
//                    accountUnlockUrl,
//                    webException);
//            }
}