我已尝试使用以下网址进行注销:
https://adfs.example.com/adfs/ls/?wa=wsignout1.0&wreply=https://localhost:32971/ https://adfs.example.com/adfs/ls/?wa=wsignout1.0&wreply=http://localhost:32971/ https://adfs.example.com/adfs/ls/?wa=wsignoutcleanup1.0&wreply=https://localhost:32971/ https://adfs.example.com/adfs/ls/?wa=wsignoutcleanup1.0&wreply=http://localhost:32971/
在ADFS端,我将WS-federation Passive Endpoint设置为 https://localhost:32971/
这也是默认设置,所以我在这里缺少什么?
答案 0 :(得分:0)
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);
试试这个。可能有帮助。