Пример #1
0
        internal SessionStateStoreData CreateUninitializedItem2(HttpContext context, string id, int timeout)
        {
            SessionStateStoreData data = CreateNewStoreData(context, timeout);

            // 将Session数据写入文件
            byte[] bytes = SessionUtils.SerializeStoreData(data, 7000);

            FileStore.SaveToFile(bytes, id);

            return(data);
        }
Пример #2
0
        public override void SetAndReleaseItemExclusive(HttpContext context, string id, SessionStateStoreData item, object lockId, bool newItem)
        {
            byte[] bytes = SessionUtils.SerializeStoreData(item, 7000);

            FileStore.SaveToFile(bytes, id);
        }