private static DispatchStepResult DispatchIfLogoffRequest(RequestContext requestContext) { if (requestContext.RequestType != OwaRequestType.Logoff) { return(DispatchStepResult.Continue); } ExTraceGlobals.CoreCallTracer.TraceDebug(0L, "[RequestDispatcher::DispatchIfLogoffRequest] entry."); OwaDiagnostics.TracePfd(21769, "Dispatching logoff request.", new object[0]); requestContext.UserContext = UserContextManager.GetUserContext(requestContext.HttpContext, false); if (requestContext.UserContext != null) { RequestDispatcher.DoLogoffCleanup(requestContext); } if (RequestDispatcherUtilities.IsChangePasswordLogoff(requestContext.HttpContext.Request)) { requestContext.DestinationUrl = OwaUrl.LogoffChangePasswordPage.GetExplicitUrl(requestContext.HttpContext.Request); } else { requestContext.DestinationUrl = RequestDispatcher.GetLogoffURL(requestContext); } return(DispatchStepResult.RedirectToUrl); }