public void ProcessRequest(HttpContext context) { // without this, a parser error is displayed in some browsers context.Response.Write("<html></html>"); FormsAuthentication.SignOut(); WebAuthenticator wa = new WebAuthenticator(); wa.Logout(ResolveHostUrl("/")); }
protected void DenyAccess(HttpContext context, string message = "Access denied.") { try { FormsAuthentication.SignOut(); WebAuthenticator webAuth = new WebAuthenticator(); webAuth.Logout(("~/Account/DenyAccess?ReturnUrl=%2f&msg=" + HttpUtility.UrlEncode(message)).ToAbsoluteUrl()); //context.Response.Redirect("~/Account/DenyAccess?ReturnUrl=%2f&msg=Access%20Denied"); //context.Response.Redirect("~/NonSecure/AccessDenied.aspx"); } catch (Exception ex) { Log.Write(ex, Log.Mask.Failure); } finally { } }