FormsAuthentication.RedirectFromLoginPage重新加载页面 [英] FormsAuthentication.RedirectFromLoginPage reload page
本文介绍了FormsAuthentication.RedirectFromLoginPage重新加载页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的净memebership制度,uptil现在我还没有与任何真正的麻烦。 我现在有一个重叠的地方,用户可以创建一个配置文件。当创建配置文件我只是想重定向到同一页面,而不是默认页或返回URL - 不存在
I am using the .Net memebership system, and uptil now I haven't had any real troubles with it. I now have a overlay where a user can create a profile. When the profile is created I just want to redirect to the same page, and not to the default page or the return url - which doesn't exists.
我试图阻止FormsAuthentication.RedirectFromLoginPage反应,但没有效果:
I have tried to stop the FormsAuthentication.RedirectFromLoginPage response, but with no effect:
FormsAuthentication.RedirectFromLoginPage(username, false);
// End the redirect so it doesnt redirect to default url (front-page)
Response.End();
Response.Redirect(Request.RawUrl);
有没有人有一个想法,这可怎么解决呢?
Does anyone have an idea to how this can be solved?
推荐答案
而不是使用这样的:
FormsAuthentication.SetAuthCookie(username, false);
Response.Redirect(Request.RawUrl);
这篇关于FormsAuthentication.RedirectFromLoginPage重新加载页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文