public static void RemoveWebUserInfo() { var value = SessionCookieUtility.GetCookie(Constant.WebCookieKey); if (value.IsNotEmpty()) { SessionCookieUtility.RemoveCookie(Constant.WebCookieKey); } }
private static WebUserContext GetWebUser() { WebUserContext webContext = null; try { string key = SessionCookieUtility.GetCookie(Constant.WebCookieKey).ToString(); if (key.IsNotEmpty()) { webContext = DesEncoderAndDecoder.Decrypt(key).Deserialize <WebUserContext>(); } } catch (Exception ex) { LogUtils.LogError("UserContext.GetWebUser", ex); } return(webContext); }