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


C# HttpSessionState.Remove方法代码示例

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


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

示例1: clearSessionError

 public void clearSessionError(HttpSessionState session)
 {
     if (session["login"] != null)
     {
         session.Remove("login");
     }
 }
开发者ID:hyori7,项目名称:WebDirectory,代码行数:7,代码来源:User_gl.cs

示例2: ClearSession

 /// <summary>
 /// Clear the maestrano session
 /// </summary>
 /// <param name="httpSessionObj"></param>
 public void ClearSession(HttpSessionState httpSessionObj)
 {
     httpSessionObj.Remove("maestrano");
 }
开发者ID:benjineering,项目名称:maestrano-dotnet,代码行数:8,代码来源:Sso.cs

示例3: DeleteOldSession

 public static void DeleteOldSession(List<Job> job, HttpSessionState session)
 {
     if (job[0] != null)
     {
         session.Remove("Job_" + job[0].JobId);
     }
 }
开发者ID:huttan1,项目名称:spisab2,代码行数:7,代码来源:Site.cs

示例4: openMemberSession

 private bool openMemberSession(bool bAdmin, string sUser, HttpSessionState userSession)
 {
     if (userSession != null)
     {
         userSession.Remove(SESSIONMEMBER_DISCONNECTED);
         userSession.Remove(SESSIONMEMBER_DISCONNECTING);
         userSession.Remove(SESSIONMEMBER_CONNECTIONERROR);
     }
     InterThreadHashtable tableSessions = bAdmin ? m_mapAdminSessions : m_mapUserSessions;
     bool bAlreadyConnected = tableSessions.ContainsKey(sUser);
     if (bAlreadyConnected)
     {
         HttpSessionState connectedSession = null;
         try
         {
             connectedSession = ((HttpSessionState)tableSessions.Get(sUser));
         }
         catch
         {
             connectedSession = null;
         }
         if (userSession != null)
         {
             try
             {
                 if (connectedSession != null)
                 {
                     if (connectedSession.SessionID != userSession.SessionID) // disconnect the current session
                         AppendError(connectedSession, "User " + sUser + IGPEMULTIPLEXING_ERROR_SINGLESIGNON);
                 }
             }
             catch (Exception) { }
             finally
             {
                 tableSessions.Remove(sUser);
                 bAlreadyConnected = false;
             }
         }
         else
         {
             if (connectedSession != null)
                 AppendError(connectedSession, IGPEMULTIPLEXING_ERROR_NULLSESSION);
             return true;
         }
     }
     tableSessions.Add(sUser, userSession);
     return bAlreadyConnected;
 }
开发者ID:JBetser,项目名称:Imagenius_SDK,代码行数:48,代码来源:IGPEMultiplexing.cs

示例5: ClearSession

 /// <summary>
 /// Clear the maestrano session
 /// </summary>
 /// <param name="httpSessionObj"></param>
 public void ClearSession(HttpSessionState httpSessionObj)
 {
     httpSessionObj.Remove(presetName);
 }
开发者ID:CamilleCrespeau,项目名称:maestrano-dotnet,代码行数:8,代码来源:Sso.cs

示例6: DownloadFile

        public static bool DownloadFile(Page page, HttpResponse response, HttpSessionState userSession)
        {
            Regex RE = new Regex(@"[,]+");
            string[] tImagePathDef = RE.Split((string)userSession[IGSMRequest.IGSMREQUEST_PARAM_LISTPATH]);

            string sImageFileName = Path.GetFileName(tImagePathDef[0]);
            string sFilePath = page.MapPath(tImagePathDef[0]);
            response.ContentType = "application/octet-stream";
            response.AddHeader("Content-Disposition", "attachment; filename=" + sImageFileName);
            response.WriteFile(sFilePath);
            userSession.Remove(IGSMRequest.IGSMREQUEST_PARAM_LISTPATH);
            return true;
        }
开发者ID:JBetser,项目名称:Imagenius_SDK,代码行数:13,代码来源:IGPEWebServer.cs

示例7: RemoveSession

 static void RemoveSession(HttpSessionState state, string uploadSessionId)
 {
     state.Remove(GetUploadSessionKey(uploadSessionId));
 }
开发者ID:codingbat,项目名称:BandCamp,代码行数:4,代码来源:SessionHandler.cs


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