In a core assembly, which is run both in a windows service, and in a web application, I need to store information per user session. The service will have a single user sessi
If possible I'd suggest having it as an input parameter to some initialize method in the class library that would need to be called before the class library can be used.
If that's not an option I'd look at HttpRuntime.Cache which I think would be non null even if HttpRuntime.Current is null. I'm not a webforms guy but I remember someone mentioning that for a similar question sometime somewhere (can't find that question now).