.net FormsAuthentication.RedirectFromLoginPage重新加载页面
我使用的是.Net memebership系统,现在我还没有遇到任何实际问题。 我现在有一个覆盖,用户可以创建一个配置文件。创建概要文件时,我只想重定向到同一个页面,而不是默认页面或返回url,因为它不存在 我已尝试停止FormsAuthentication.RedirectFromLoginPage响应,但无效:.net FormsAuthentication.RedirectFromLoginPage重新加载页面,.net,forms-authentication,.net,Forms Authentication,我使用的是.Net memebership系统,现在我还没有遇到任何实际问题。 我现在有一个覆盖,用户可以创建一个配置文件。创建概要文件时,我只想重定向到同一个页面,而不是默认页面或返回url,因为它不存在 我已尝试停止FormsAuthentication.RedirectFromLoginPage响应,但无效: FormsAuthentication.RedirectFromLoginPage(username, false); // End the redirect so it doe
FormsAuthentication.RedirectFromLoginPage(username, false);
// End the redirect so it doesnt redirect to default url (front-page)
Response.End();
Response.Redirect(Request.RawUrl);
有人知道如何解决这个问题吗?用这个代替:
FormsAuthentication.SetAuthCookie(username, false);
Response.Redirect(Request.RawUrl);