/// <summary>
        /// Reset the session
        /// </summary>
        /// <param name="sender">
        /// The sender
        /// </param>
        /// <param name="e">
        /// The parameter is not used
        /// </param>
        protected void Session_End(object sender, EventArgs e)
        {
            Logger.Info("ending session ...");
            HttpSessionStateBase sessionBase = new HttpSessionStateWrapper(Session);

            SessionQueryManager.ResetSession(sessionBase);
            try
            {
                foreach (string SessionName in Session.Keys)
                {
                    if (Session[SessionName] != null && Session[SessionName] is SessionImplObject)
                    {
                        ((SessionImplObject)Session[SessionName]).ClearCache();
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex.Message, ex);
            }
        }
        /// <summary>
        /// Initialize the session, get a cookie for language
        /// </summary>
        /// <param name="sender">
        /// The parameter is not used.
        /// </param>
        /// <param name="e">
        /// The parameter is not used.
        /// </param>
        protected void Session_Start(object sender, EventArgs e)
        {
            Logger.Info("starting session ...");
            try
            {
                RemoveJsTreeCookie(this.Context);
                CultureInfo culture = LocaleResolver.GetCookie(this.Context);
                Thread.CurrentThread.CurrentUICulture = culture;
                Logger.Info("starting session success");


                var query = new SessionQuery {
                    CurrentCulture = culture
                };

                Utils.App_Data_Path = this.Context.Server.MapPath("~/App_Data/");
                string cacheFolder = this.GetCacheFolder();

                query.SetCacheFolder(cacheFolder);
                SessionQueryManager.SaveSessionQuery(this.Context.Session, query);
                Thread.CurrentThread.CurrentUICulture = culture;
                Logger.Info("starting session success");
            }
            catch (HttpException ex)
            {
                Logger.Error("starting session failled");
                Logger.Error(ex.Message, ex);
            }
            catch (SecurityException ex)
            {
                Logger.Error("starting session failled");
                Logger.Error(ex.Message, ex);
            }
            catch (IOException ex)
            {
                Logger.Error("starting session failled");
                Logger.Error(ex.Message, ex);
            }
        }