当前位置: 首页>>代码示例>>C#>>正文


C# HttpSessionStateBase.Abandon方法代码示例

本文整理汇总了C#中System.Web.HttpSessionStateBase.Abandon方法的典型用法代码示例。如果您正苦于以下问题:C# HttpSessionStateBase.Abandon方法的具体用法?C# HttpSessionStateBase.Abandon怎么用?C# HttpSessionStateBase.Abandon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Web.HttpSessionStateBase的用法示例。


在下文中一共展示了HttpSessionStateBase.Abandon方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Logout

 public static void Logout(HttpSessionStateBase session, HttpResponseBase response)
 {
     var module = FederatedAuthentication.SessionAuthenticationModule;
     module.DeleteSessionTokenCookie();
     module.SignOut();
     session.Abandon();
 }
开发者ID:Exclr8,项目名称:CloudCore,代码行数:7,代码来源:CloudAuthentication.cs

示例2: Logoff

        /// <summary>
        /// Clears the user session, clears the forms auth ticket, expires the forms auth cookie.
        /// </summary>
        /// <param name="session">HttpSessionStateBase</param>
        /// <param name="response">HttpResponseBase</param>
        public static void Logoff(HttpSessionStateBase session, HttpResponseBase response)
        {
            // Delete the user details from cache.
            session.Abandon();

            // Delete the authentication ticket and sign out.
            FormsAuthentication.SignOut();

            // Clear authentication cookie.
            HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, "");
            cookie.Expires = DateTime.Now.AddYears(-1);
            response.Cookies.Add(cookie);
        }
开发者ID:vijay33tube,项目名称:MVC4FormsAuthentication,代码行数:18,代码来源:UserManager.cs

示例3: Destroy

        /// <summary>
        /// Destroys the specified session.
        /// </summary>
        /// <param name="session">The session.</param>
        public static void Destroy(HttpSessionStateBase session)
        {
            if (session == null)
            {
                return;
            }

            session[SessionKey] = null;
            session.Abandon();
        }
开发者ID:Mike343,项目名称:Netcoders,代码行数:14,代码来源:ApplicationSession.cs

示例4: ClearSession

 /// <summary>
 /// Clears the session of all indexes & variables
 /// </summary>
 /// <param name="session"></param>
 public static void ClearSession(HttpSessionStateBase session)
 {
     session.Clear();
     session.Abandon();
 }
开发者ID:nissafors,项目名称:Bibblan,代码行数:9,代码来源:AccountHelper.cs

示例5: destroy

 internal static void destroy(HttpSessionStateBase session, HttpResponseBase response)
 {
     session.Clear();
     session.Abandon();
     response.Cookies.Remove("PaydromeUserLogin");
 }
开发者ID:ju2cho7,项目名称:aerodrome,代码行数:6,代码来源:SessionHelper.cs

示例6: SignOut

 public void SignOut(HttpSessionStateBase session)
 {
     formsAuthentication.SignOut();
     session.Abandon();
 }
开发者ID:RezaMahmood,项目名称:ChopShop,代码行数:5,代码来源:AdminAuthenticationService.cs

示例7: Destroy

 /// <summary>
 /// Destroy
 /// </summary>
 /// <param name="sessionState"></param>
 public static void Destroy(HttpSessionStateBase sessionState)
 {
     sessionState.Abandon();
 }
开发者ID:vuchannguyen,项目名称:lg-py,代码行数:8,代码来源:SessionManager.cs


注:本文中的System.Web.HttpSessionStateBase.Abandon方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。