How to end Cookie's Session?
-
Hi, Iam working in a webapplication in which I am using RSA cookie authentication to login. I login using secure RSA ID in which i login using different users with different Tokens such as Admin , client etc.., for ex.. if i login using Admin account and RSA pincode i have to redirect to a different destination page than that of the client account's destination page. The thing is that i have written RSA secured Cookie for login in a page called Authorize.aspx as follows in the HTML page of Authorize.aspx: <% Dim RSACookieAPI '//Response.Cookies["RSACookieAPI"].Expires = DateTime.Now.AddYears(-30) RSACookieAPI = Server.CreateObject("Rsacookieapi.RSACookie") %> Hello <%=RSACookieAPI.RSAGetUserName() %> <% session("rsauser")=RSACookieAPI.RSAGetUserName() %> <% Response.Redirect("auth.aspx") %> My question is that when i click logout in the destination page for each account the RSA cookie's time frame and user's session should expire and come to the home page. I don't know how to end the RSA cookie's session as i have different accounts in each page from which i logout. So pls help me with this issue. i think i have confused u a bit with my question. Sorry for that. pls help me with this issue. Thanks and Regards Vijay.
-
Hi, Iam working in a webapplication in which I am using RSA cookie authentication to login. I login using secure RSA ID in which i login using different users with different Tokens such as Admin , client etc.., for ex.. if i login using Admin account and RSA pincode i have to redirect to a different destination page than that of the client account's destination page. The thing is that i have written RSA secured Cookie for login in a page called Authorize.aspx as follows in the HTML page of Authorize.aspx: <% Dim RSACookieAPI '//Response.Cookies["RSACookieAPI"].Expires = DateTime.Now.AddYears(-30) RSACookieAPI = Server.CreateObject("Rsacookieapi.RSACookie") %> Hello <%=RSACookieAPI.RSAGetUserName() %> <% session("rsauser")=RSACookieAPI.RSAGetUserName() %> <% Response.Redirect("auth.aspx") %> My question is that when i click logout in the destination page for each account the RSA cookie's time frame and user's session should expire and come to the home page. I don't know how to end the RSA cookie's session as i have different accounts in each page from which i logout. So pls help me with this issue. i think i have confused u a bit with my question. Sorry for that. pls help me with this issue. Thanks and Regards Vijay.
Dear vijay, you can set the logout events with cookie.discard and session.abandon methods then in the page postback check the user has the session and cookie like that. Then you can redirect them to home page
All The Best Sathesh Pandian