1

There are 1 best solutions below

1
On
            string absoluteUrl = HttpContext.Request.Url.AbsoluteUri;
            string replyUrl = absoluteUrl.Substring(0, absoluteUrl.LastIndexOf("/") + 1);
            var issuer = FederatedAuthentication.WSFederationAuthenticationModule.Issuer;
            var signOutUrl = WSFederationAuthenticationModule.GetFederationPassiveSignOutUrl(issuer, null, null);
            WSFederationAuthenticationModule.FederatedSignOut(new Uri(signOutUrl), new Uri(replyUrl));
            FederatedAuthentication.SessionAuthenticationModule.SignOut();
            Response.Redirect(Request.RawUrl);

Try this. Might help.