Is there a HttpContext.Current equivalent when self hosting?
There isn’t, no.
+Demis Bellot Maybe explaining why I was trying to get this will give you some other ideas I could take… I need to change the connection string (in nhibernate) based on which tenant a user belongs too (think 1 tenant = 1 db user). I store this on the the AuthSession and I need to get this within my overridden DriverConnectionProvider (a nhibernate concept).
Also this isn’t by no means urgent. Right now my setup is web hosted, but I’m trying to plan for the future if we decide to go with self hosted.
You might be able to use the static
RequestContext.Items dictionary for storing per-request metadata.
Ohh good idea. I’ll look into that. Thanks Demis!