首页 > Web开发 > 详细

[Asp.Net] Form验证中 user.identity为false

时间:2016-06-13 22:09:45      阅读:179      评论:0      收藏:0      [点我收藏+]

这个方法可以是user.identity设置为true

FormsAuthentication.SetAuthCookie(Username, true);

 

 但是要开启form验证,

在配置文件中

<authentication mode="Forms"></authentication>

 

还有有的项目中默认移除了from验证的module, You need to remove this line

<system.webServer>
<modules>
<remove name="FormsAuthentication" />
</modules>
</system.webServer>

 

[Asp.Net] Form验证中 user.identity为false

原文:http://www.cnblogs.com/qslcna/p/5582015.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!