本文整理汇总了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");
}
}
示例2: ClearSession
/// <summary>
/// Clear the maestrano session
/// </summary>
/// <param name="httpSessionObj"></param>
public void ClearSession(HttpSessionState httpSessionObj)
{
httpSessionObj.Remove("maestrano");
}
示例3: DeleteOldSession
public static void DeleteOldSession(List<Job> job, HttpSessionState session)
{
if (job[0] != null)
{
session.Remove("Job_" + job[0].JobId);
}
}
示例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;
}
示例5: ClearSession
/// <summary>
/// Clear the maestrano session
/// </summary>
/// <param name="httpSessionObj"></param>
public void ClearSession(HttpSessionState httpSessionObj)
{
httpSessionObj.Remove(presetName);
}
示例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;
}
示例7: RemoveSession
static void RemoveSession(HttpSessionState state, string uploadSessionId)
{
state.Remove(GetUploadSessionKey(uploadSessionId));
}