First let me explain the scenario.
There are 2 websites, website-A and website-B. Both websites are hosted in different domains.
User is able to login to website-B's homepage through website-A login page. This means that the user is now in complete control of website-B's functionalities.
On successful logout in website-B, the user is re-directed to the homepage of website-B (which is the right behaviour).
My question starts here.
Is there a possible way to ensure that the user is re-directed to website-A's login page on successful logout in website-B rather than re-directing to website-B's login page?
If this is possible, then please do guide me on how to proceed in this scenario.
Thanks in advance !!!.
你为什么不使用Response.Redirect("url");
If you are using forms authentication, you can create a logout method like :
private void Logout()
{
Session.Abandon();
FormsAuthentication.SignOut();
FormsAuthentication.RedirectToLoginPage();
}
FormsAuthentication.RedirectToLoginPage
will redirect to the LoginUrl .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.