Infinite loop when using cookieless session ID on Azure
If you use cookieless session ID and deploy them on Azure, you might get infinite loop when you query your web site, and browser would down. In this scenario, you need to overwrite ASP.NET default ISessionIDManager.
In method GetSessionID, your could should be below
public string GetSessionID(HttpContext context)
{
var id = HttpContext.Current.Items["AspCookielessSession"] as string;
// Azure web site does not support header "AspFilterSessionId", so we cannot get context.Items["AspCookielessSession"]
// for azure web site use, Headers["X-Original-URL"] format: /(S(xxx))/default.aspx
var originalUrl = HttpContext.Current.Request.Headers["X-Original-URL"];
if (!string.IsNullOrEmpty(originalUrl))
{
var match = Regex.Match(HttpContext.Current.Request.Headers["X-Original-URL"], @"/\(S\((\w+)\)\)");
if (match.Success)
{
id = match.Groups[].Value;
}
} return id;
}
Don't forget to change your web.config file.
Infinite loop when using cookieless session ID on Azure的更多相关文章
- 设置aspx页面的地址栏中的Session ID的显示与隐藏
设置aspx页面的地址栏中的Session ID的显示与隐藏修改web.config文件中的sessionState节点下的cookieless的值 1.cookieless的值是false的时候隐藏 ...
- ORA-00030: User session ID does not exist.
同事在Toad里面执行SQL语句时,突然无线网络中断了,让我检查一下具体情况,如下所示(有些信息,用xxx替换,因为是在处理那些历史归档数据,使用的一个特殊用户,所以可以用下面SQL找到对应的会话信息 ...
- 【转】Session ID/session token 及和cookie区别
Session + Cookie 知识收集! cookie机制采用的是在客户端保持状态的方案.它是在用户端的会话状态的存贮机制,他需要用户打开客户端的cookie支持.cookie的作用就是为了解决 ...
- Session id实现通过Cookie来传输方法及代码参考
1. Web中的Session指的就是用户在浏览某个网站时,从进入网站到浏览器关闭所经过的这段时间,也就是用户浏览这个网站所花费的时间.因此从上述的定义中我们可以看到,Session实际上是一个特定的 ...
- [Javascript] Intro to Recursion - Detecting an Infinite Loop
When using recursion, you must be mindful of the dreaded infinite loop. Using the recursive function ...
- 获得创建临时表的session id
通过sql server的default trace和tempdb中的sys.objects视图,你能够获得创建临时表的session id,下面是相应的sql语句: DECLARE @FileNam ...
- 【从翻译mos文章】正在实施的获取job的 session id
正在实施的获取job的 session id 参考原始: How to get the session Id of the Running Job (Doc ID 1604966.1) 申请: Ora ...
- [解决]Linux Tomcat启动慢--Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [236,325] milliseconds
一.背景 今天部署项目到tomcat,执行./startup.sh命令之后,访问项目迟迟加载不出来,查看日志又没报错(其实是我粗心了,当时tomcat日志还没打印完),一开始怀疑是阿里云主机出现问题, ...
- Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [33,755] milliseconds.
刚部署好程序,第一次登录时,加载非常得慢,查看log日志发现:Creation of SecureRandom instance for session ID generation using [SH ...
随机推荐
- 设计模式之六大原则——接口隔离原则(ISP)
设计模式之六大原则——接口隔离原则(ISP) 转载于:http://www.cnblogs.com/muzongyan/archive/2010/08/04/1792528.html 接口隔离原则 ...
- mysql优化limit分页
- Thinking in Java——笔记(15)
Generics The term "generic" means "pertaining or appropriate to large groups of class ...
- logoff remote desktop sessions via command line tools
This trick I learned from my one of ex-college. In Windows servers, only two remote desktop session ...
- NumberFormat DecimalFormat
http://blog.csdn.net/evangel_z/article/details/7624503 http://blog.163.com/wangzhengquan85@126/blog/ ...
- [dpdk] 熟悉SDK与初步使用 (一)(qemu搭建实验环境)
搭建实验环境: troubleshoot 第一步加载驱动 第二步切换驱动 使用了所有qemu支持的卡 [tong@T7:~/VM/dpdk] % cat start.sh sudo qemu-syst ...
- redis笔记
redis字符串 : 存储基本的一个键值对. redis哈希 : Redis的哈希值是字符串字段和字符串值之间的映射,所以他们是表示对象的完美数据类型. 一个哈希表可以存在多个键值对,可对键值进行增删 ...
- VMware安装chrome os遇到选择网络问题.
在下载下来的vmx文件中添加一行ethernet0.virtualDev = "e1000" 就可以了.参考网站http://communities.vmware.com/thre ...
- TweenMax学习一
TweenMaxjs是一个性能很高的js动画框架,它与css3动画具有时间轴的概念.你可以很方便的把动画添加到一个时间轴队列里面去按照你需要的顺序去执行. 官网地址: http://greensock ...
- .net DropDownList静态联动
1.前台 <span id="spnClient" style="margin-left: 30px; margin-top: 10px"> < ...