That code was never intended for inclusion in a .dll. It is included as merely a suggestion for session mgmt in ASP.NET. You'd use completely different patterns for a Winforms app.
I tend to agree with jnapier, your architecture is way off. Your .dll shouldn't be doing Session management of that nature, and it should certainly not be bound to ASP.NET like that. That is something that should be done to some extent in the consuming application, mainly because the function of said application will usually dictate the optimal pattern, not the underlying domain.
It's nice that you have a separation of concerns, but you need to separate the right concerns.
|