惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
S
SegmentFault 最新的问题
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
美团技术团队
爱范儿
爱范儿
博客园 - 三生石上(FineUI控件)
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
DataBreaches.Net
F
Fortinet All Blogs
TaoSecurity Blog
TaoSecurity Blog
D
Docker
C
Cybersecurity and Infrastructure Security Agency CISA
K
Kaspersky official blog
宝玉的分享
宝玉的分享
腾讯CDC
Google Online Security Blog
Google Online Security Blog
Recorded Future
Recorded Future
T
The Exploit Database - CXSecurity.com
T
The Blog of Author Tim Ferriss
V
V2EX
S
Securelist
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
CERT Recently Published Vulnerability Notes
A
Arctic Wolf
Scott Helme
Scott Helme
L
LINUX DO - 热门话题
Y
Y Combinator Blog
P
Proofpoint News Feed
T
Tor Project blog
AWS News Blog
AWS News Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
博客园 - 聂微东
T
Threat Research - Cisco Blogs
B
Blog
Attack and Defense Labs
Attack and Defense Labs
L
Lohrmann on Cybersecurity
C
CXSECURITY Database RSS Feed - CXSecurity.com
阮一峰的网络日志
阮一峰的网络日志
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
IT之家
IT之家
N
News and Events Feed by Topic
博客园 - 司徒正美
H
Help Net Security
C
Cisco Blogs
C
Check Point Blog
S
Secure Thoughts

博客园 - Hex

大辉谈-备战双十一之动静分离实战 [知识库:python-tornado]异步调用中的上下文控制Tornado stack context 在 CentOS 下手工安装 Docker v1.1x Docker: 如何修改 Docker 的镜像存储位置 Docker学习记录3: 搭建 Private Registry - Hex [原创]Docker学习记录: Shipyard+Swarm+Consul+Service Discover 搭建教程 解决mac OS 10.9 下python 在terminal下崩溃的问题 ssh连接失败, 记下来原因和解决方案 centos+nginx+redmine+gitosis安装指南 面向对象控与python内存泄漏 python 之禅:import this 新头衔:热酷高级python软件工程师,你问我去热酷干嘛? 使用AuthToken架构保护用户帐号验证Cookie的安全性 热酷,新的领域,新的发展 恩,终于有我自己的时间整理下这两年的思路了 [思想火花]:函数命名及参数 MouseOut和RollOut的区别 关于VS2008单元测试中加载配置文件的问题 实现一个Ajax模式的文件上传功能有多难?
竟然遇到取FormAuthentication的值取不出来的情况
Hex · 2009-01-11 · via 博客园 - Hex

在开发中,竟然遇到取FormAuthentication的值取不出来的情况,忘了以前是怎么理解这个问题的了,为了避免问题,先放上来,容后再描述。

 出现问题的原因是当在自定义的HttpModule类中取用户的信息时,竟然什么都取不出来,以前好像解决过这个问题,但是这次竟然花了3个小时才搞懂,看来确实是老了!!

 解决方法是由于FormAuthentication实际上是由FormsAuthenticationModule实现的,所以在Web.config中重新声明这些个Module,问题就解决了.(并且一定要在你想用的Module的前面)

 <remove name="FormsAuthenticationModule" />
   <add name="FormsAuthenticationModule" type="System.Web.Security.FormsAuthenticationModule" />
   <remove name="UrlAuthorization" />
   <add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule" />
   <remove name="DefaultAuthentication" />
   <add name="DefaultAuthentication" type="System.Web.Security.DefaultAuthenticationModule" />

具体的原理也没搞懂,厄~~