private void ReadSessionHeaderInfo() { SessionHeaderInfo = SessionCookieHelper <ISessionHeaderInfo> .Get(Constants.SecurityKey.HeaderInfo_SessionName, Constants.SecurityKey.HeaderInfo_CookieName, Constants.SecurityKey.key, Constants.SecurityKey.IV); if (SessionHeaderInfo != null && !string.IsNullOrEmpty(Host) && string.Compare(SessionHeaderInfo.HeaderId, Host, true) != 0) { SessionHeaderInfo = null; SessionCookieHelper <ISessionHeaderInfo> .Clear(Constants.SecurityKey.HeaderInfo_SessionName, Constants.SecurityKey.HeaderInfo_CookieName); } }
private void SaveSessionHeaderInfoFromRoute(string channelId) { if (!string.IsNullOrEmpty(channelId)) { if (SessionHeaderInfo == null) { SessionHeaderInfo = new Model.Common.SessionHeaderInfo(Host); } SetSessionRouteChannelInfo(channelId); } SessionCookieHelper <ISessionHeaderInfo> .Save(SessionHeaderInfo, Constants.SecurityKey.HeaderInfo_SessionName, Constants.SecurityKey.HeaderInfo_CookieName, Constants.SecurityKey.key, Constants.SecurityKey.IV); }
private void SaveSessionHeaderInfo(string channelId, string promotionCode) { if (!string.IsNullOrEmpty(channelId)) { if (SessionHeaderInfo == null) { SessionHeaderInfo = new Model.Common.SessionHeaderInfo(Host); } SessionHeaderInfo.ChannelId = channelId; SessionHeaderInfo.PromotionCode = promotionCode; } SessionCookieHelper <ISessionHeaderInfo> .Save(SessionHeaderInfo, Constants.SecurityKey.HeaderInfo_SessionName, Constants.SecurityKey.HeaderInfo_CookieName, Constants.SecurityKey.key, Constants.SecurityKey.IV); }