cookie 跟 Request.IsAuthenticated 之间是什么关系
2013-05-21 11:37
239 查看
Request.IsAuthenticated是根据web.config中的cookie设置进行判断的,比如:
使用Forms验证,登录后写cookie的代码很简单:
这里的cookie设置也是由web.config中的设置决定的。
<authentication mode="Forms"> <forms name="cookieName" loginUrl="login.aspx" protection="All" timeout="43200" path="/" /> </authentication>
使用Forms验证,登录后写cookie的代码很简单:
FormsAuthentication.SetAuthCookie(username, true);
这里的cookie设置也是由web.config中的设置决定的。
相关文章推荐
- cookie 跟 Request.IsAuthenticated 之间的关系
- slf4j-api、slf4j-log4j12以及log4j三者之间是什么关系?
- Session跟Cookie有什么关系?假如IE禁止使用Cookie,那Session还有用吗?
- 什么是BOM?,什么是DOM? BOM跟DOM之间的关系
- slf4j-api、slf4j-log4j12以及log4j之间什么关系
- sessionStorage和localstroage 与 cookie之间有什么关联和区别
- Android系统层次结构是怎样的?各个层之间关系是什么?
- Hadoop、Hive、Spark 之间是什么关系?
- js与cookie的domain和path之间的关系
- slf4j-api、slf4j-log4j12以及log4j之间什么关系
- 今天发现猎豹浏览器的一个大坑 Request.IsAuthenticated 一直为 false;另外附加原因以及临时的解决方法
- C++标准库,标准程序库,标准模板库之间是什么关系(重要!!!)
- 请教 HINSTANCE 、HANDLE 、CWnd、 HWND到底各是什么,以及它们之间有什么关系
- PHP中全局变量$_REQUEST、 $_GET、 $_POST、 $_COOKIE 的关系和区别
- C++、Visual C++、MFC(编译和封装)之间的关系是什么?
- slf4j-api、slf4j-log4j12以及log4j三者之间是什么关系?
- slf4j-api、slf4j-log4j12以及log4j之间什么关系?
- git github gitlab之间是什么关系
- core foundation与objective-c之间有什么关系和区别
- 如何确定 Hadoop map和reduce的个数--map和reduce数量之间的关系是什么?