2011-09-16 31 views
1

我已經實現與Windows身份框架的SSO,註銷後我發送wsignoutcleanup1.0請求到所有RP的也想要清除會話,但獲取會話狀態的異常不可用,wsignoutcleanup1.0不清除當前用戶的會話

任何一個可以幫助我,

在Global.asax中

protected void WSFederationAuthenticationModule_SigningOut(object sender,  Microsoft.IdentityModel.Web.SigningOutEventArgs e) 
{ 
    Microsoft.IdentityModel.Web.FederatedAuthentication.SessionAuthenticationModule.CookieHandler.Delete(); 
    Microsoft.IdentityModel.Web.FederatedAuthentication.SessionAuthenticationModule.DeleteSessionTokenCookie(); 
    Microsoft.IdentityModel.Web.FederatedAuthentication.SessionAuthenticationModule.SignOut(); 
    FormsAuthentication.SignOut(); 
} 

回答

0

使用下面的代碼看看this post on the MSDN forums,提供問題和解決方案的詳細解釋。基本上,會話狀態在Global ASAX中不可用,但它可以提供給HTTP模塊。