public void UserLogOut()
    {
        UserInfoResource UIResource = new UserInfoResource();
        var fbWebcontext = FacebookWebContext.Current;
        HttpContext.Current.Session.Clear();
        pagebase.killFacebookCookies();

        try
        {
            if (fbWebcontext.Session != null)
            {
                fbWebcontext.DeleteAuthCookie();
            }
        }
        catch
        { }

        HttpContext.Current.Session.RemoveAll();
        StateManager stateManager = StateManager.Instance;
        UIResource.DeleteSession(HttpContext.Current.Session.SessionID);
        stateManager.Remove("objSessionvalue", StateManager.State.Session);
        HttpContext.Current.Session.Clear();
        HttpContext.Current.Session.Abandon();
    }
Пример #2
0
    public void UserLogOut()
    {
        //HttpContext.Current.Response.Cookies.Clear();
        UserInfoResource UIResource = new UserInfoResource();
        PageBase pb = new PageBase();
        var fbWebcontext = FacebookWebContext.Current;

        HttpContext.Current.Session.Clear();
        pb.killFacebookCookies();

        try
        {
            if (fbWebcontext.Session != null)
            {
                fbWebcontext.DeleteAuthCookie();
                // just to be sure...
            }
        }
        catch
        { }

        HttpContext.Current.Session.RemoveAll();
        UsersController _controller = new UsersController();
        StateManager stateManager = StateManager.Instance;
        UIResource.DeleteSession(HttpContext.Current.Session.SessionID);
        stateManager.Remove("objSessionvalue", StateManager.State.Session);
        HttpContext.Current.Session.Clear();
        HttpContext.Current.Session.Abandon();
    }
 //TEST
 public void DeleteSessionKeyDetails(String SessionID)
 {
     UserInfoResource objUser = new UserInfoResource();
     objUser.DeleteSession(SessionID);
 }