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企业培训在线考试系统的设计与实现
下一篇:对我国《小企业会计准则》的思考和探索

C#+sqlserver大学生心理测试...

Linux系统下web服务器的搭建与设计

架设Linux(2.6内核)的服务器集群【745字】

使用http协议和winsockapi实现...

WEB服务器多框架解决方案【1450字】

浅谈网站服务器安全维护技巧【2595字】

小微商家移动互联进销存...

酵母菌发酵生产天然香料...

上海居民的社会参与研究

提高教育质量,构建大學生...

浅谈高校行政管理人员的...

STC89C52单片机NRF24L01的无线病房呼叫系统设计

AES算法GPU协处理下分组加...

压疮高危人群的标准化中...

从政策角度谈黑龙江對俄...

基于Joomla平台的计算机学院网站设计与开发

浅论职工思想政治工作茬...