I am still pretty new to these technologies. The real issue here is how to manage sessions per thread in a console application. Currently, if I run it as a single thread, everything is fine. As soon as I switch to a multi-threaded model, I will begin to see rivalry at the session level (because the Session object is not an adadsafe in design). KeyNotFound exceptions (among other things) begin to throw.
In a web application, you would do something like this:
Which essentially performs initialization once per thread (web request) in global.asax.
Any ideas on how to set this (session management) in a console application?
source share