ISessionStateItemCollection interface

Summary In previous programming projects, I have used the ISessionStateItemCollection object to override the session state collection object built into HttpContext.Current.  In this blog post I’m going to demo a bug in Microsoft’s sample code used to show how to create a custom SessionStateItemCollection. Where to Find the Sample Code Microsoft provides a lot of … Read moreISessionStateItemCollection interface

Mocking HttpContext – Adding Sessions

Summary In one of my previous posts (See: Mocking HttpContext), I created a HttpContext factory and a mocked HttpContext object that can be used to simulate the HttpContext.Current object used by methods under a unit test.  In this post, I’m going to add the Session capabilities to this object so you can unit test your … Read moreMocking HttpContext – Adding Sessions

Creating Your Own Custom Session ID (Part 2)

Summary In my last post, I talked about how to override the id generator of the HttpContext.Current.Session.  In this post I’m going to show how to override the methods that affect the cookie itself. The ISessionIDManager Interface In order to get at the methods required to manipulate the cookie, you’ll need to implement the ISessionIDManager … Read moreCreating Your Own Custom Session ID (Part 2)