foreach (var sessionMgr in manager.Values)
            {                
                //### check expired session
                sessionMgr.UnloadExpiredInstances();
            }
        }
        /// <summary>
        /// 返回一个的应用实例对应的请求。
        /// </summary>
        /// <param name="e"></param>
        /// <param name="application"></param>
        /// <returns>false if not exist</returns>
        public bool TryGetApplicationInstance(HttpRequest e, out ApplicationInstanceBase application)
        {
            ///
            /// 从请求得到正确的应用程序的逻辑很简单,
            /// 对于识别应用程序,我们看看在url中的主要路径,是后的第一的域domain.xxx前:
            /// 所以http://domain.xxc/maindir/dir1/dir2,dir1/dir2在主路径MAINDIR的相对的内部路径。
            /// 该规则是在主路径指示的应用程序的名称,所以
            /// http://localhost:8080/chat/index.html 识别的聊天应用程序
            /// http://localhost:8080/chat/chat2/index.html 识别的聊天应用程序
            ///             
            ///
            application = null;
            
            string[] paths = e.Path.Split(new string[] { "/" }, StringSplitOptions.RemoveEmptyEntries);
           
            if (paths.Length == 0) return false;
           
            string mainPath = paths[0];
            ///
            /// 立即检查是否存在的ApplicationUniqueName等于主路径
            ///
            if (!applications.ContainsKey(mainPath)) return false;
            //Ok the applicatoin Exist!
            
            SessionManager sessionMgr = applications[mainPath];
		
- 上一篇:ASP.net企业培训在线考试系统的设计与实现 
- 下一篇:对我国《小企业会计准则》的思考和探索 
- 
- 
- 
- 
- 
- 
- 
- 乳业同业并购式全产业链...
- 十二层带中心支撑钢结构...
- 电站锅炉暖风器设计任务书
- java+mysql车辆管理系统的设计+源代码
- 当代大学生慈善意识研究+文献综述
- 大众媒体对公共政策制定的影响
- 杂拟谷盗体内共生菌沃尔...
- 酸性水汽提装置总汽提塔设计+CAD图纸
- 中考体育项目与体育教学合理结合的研究
- 河岸冲刷和泥沙淤积的监测国内外研究现状