62,047
社区成员
发帖
与我相关
我的任务
分享
<!--验证方式及设置-->
<authentication mode="Forms">
<forms loginUrl="LoginDl.aspx" name=".yinyuebbCoName"></forms>
</authentication>
<authorization>
<allow users="*"/>
</authorization>
if (HttpContext.Current.User != null)
{
if (HttpContext.Current.Request.IsAuthenticated == true) //验证过的一般用户才能进行角色验证
{
System.Web.Security.FormsIdentity fi = (System.Web.Security.FormsIdentity)HttpContext.Current.User.Identity;
System.Web.Security.FormsAuthenticationTicket ticket = fi.Ticket; //取得身份验证票
}
return "";
}
else
return "";