public SessionStateStoreData DoGet( HttpContext context, bool exclusive, string id, out bool locked, out TimeSpan lockAge, out object lockId, out SessionStateActions actionFlags) { ItemState itemState; int iLockId; byte[] data = exclusive ? session.GetAndLock(id, out iLockId, out locked, out lockAge, out itemState) : session.Get(id, out iLockId, out locked, out lockAge, out itemState); lockId = iLockId; actionFlags = (SessionStateActions)itemState; RuntimePlatformUtils.SetRetrievedSessionSize(context, data == null ? 0 : data.Length); if (data == null) { return(null); } using (var s = new MemoryStream(data)) { var item = Deserialize(context, s); _rqOrigStreamLen = (int)s.Position; return(item); } }