0
我使用身份验证引擎网站和用户配置文件。 当我与引擎网站进入并更改网页到页面用户时,我的身份验证是不是change.how修复它? web.config中的代码是:用于认证码如何在c#中使用url进行多重身份验证?
<authentication mode="Forms">
<forms loginUrl="~/Login.aspx" timeout="2880"/>
</authentication>
登录表单(用户和发动机)是什么?
FormsAuthenticationTicket tkt;
string cookiestr;
HttpCookie ck;
tkt = new FormsAuthenticationTicket(1, listBU[0].UserName, DateTime.Now, chRemmember.Checked ? DateTime.Now.AddDays(30) : DateTime.Now.AddDays(1), true, "user");
cookiestr = FormsAuthentication.Encrypt(tkt);
ck = new HttpCookie(FormsAuthentication.FormsCookieName, cookiestr);
if (true)
ck.Expires = tkt.Expiration;
ck.Path = FormsAuthentication.FormsCookiePath;
HttpContext.Current.Response.Cookies.Add(ck);
和检查验证码:
if(User.Identity.IsAuthenticated)
{
//do
}
如何为它创建多个认证?