form 验证 登陆验证后, IsAuthenticated总是 false ,怎么回事 啊?
login.aspx.cs
里面是:
FormsAuthentication.SetAuthCookie(sUserId,Cookie.Checked);
其他页面有些 上面判断 登录了没有
if(HttpContext.Current.User.Identity.IsAuthenticated)
{
}
登录, 其他页面上的 if(HttpContext.Current.User.Identity.IsAuthenticated)
总是false 了,
怎么回事呢???? 救命啊!!!!!
附:
<system.web>
<hostingEnvironment idleTimeout="20" shutdownTimeout="30"/>
<globalization requestEncoding="gb2312" responseEncoding="gb2312" />
<customErrors mode="Off" defaultRedirect="/Error.html" />
<authentication mode="Forms">
<forms loginUrl="/Login.aspx" defaultUrl="/Default.aspx" name="UserCookie" protection="All" timeout="40" path="/" />
</authentication>
</system.web>