帮我解释一下下面几行代码
if (FormsAuthentication.GetRedirectUrl(userId, false).EndsWith(URL_DEFAULT))
{
FormsAuthentication.SetAuthCookie(userId, false);
HttpContext.Current.Response.Redirect(URL_ACCOUNTSIGNIN, true);
}
else
{
// Take the customer back to where the came from
FormsAuthentication.SetAuthCookie(userId, false);
HttpContext.Current.Response.Redirect(FormsAuthentication.GetRedirectUrl(userId, false), true);
}
if (FormsAuthentication.GetRedirectUrl(userId, false).EndsWith(URL_DEFAULT))
{
FormsAuthentication.SetAuthCookie(userId, false);
HttpContext.Current.Response.Redirect(URL_ACCOUNTSIGNIN, true);
}
else
{
// Take the customer back to where the came from
FormsAuthentication.SetAuthCookie(userId, false);
HttpContext.Current.Response.Redirect(FormsAuthentication.GetRedirectUrl(userId, false), true);
}
解决方案 »
- asq.net 显示SQL 的日期 ,
- vs2008开发的aspx网页,如何发布后,用户界面不能修改
- 用记事本做出来的asp.net web程序如何发布?
- js 字符替换。 急! 急! 急! 急! 急! 急! 急! 急! 急!
- web控件给button添加事件问题
- ◆◇◆ DataGrid 前景色的问题! ◆◇◆
- 碰到Object moved to here的问题
- 哪位高手可以帮我注释下DBHelper
- 大伙,来看看这个问题
- 请问创建WEB服务?
- 如何转换c# to vb.net public bool 函数名(string a, sqlParameter []parameter, out string b)
- 无法运行ASP.NET 1.1的程序
不是的话跳到登陆页面
也就是FORM验证写一下COOKIE,因为FORM验证时,它先判断是不是匿名用户登陆,也就是到COOKIE里找有没有注册过这个用户FormsAuthentication.GetRedirectUrl(userId, false).EndsWith(URL_DEFAULT))
是取返回的URL,和用户