Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

Trouble boostrapping Session storage #7

Open
dplaskon opened this issue May 20, 2010 · 2 comments
Open

Trouble boostrapping Session storage #7

dplaskon opened this issue May 20, 2010 · 2 comments

Comments

@dplaskon
Copy link

Perhaps I'm going about this incorrectly, but if I attempt to configure the NCommon session storage from Application_Start, HttpContext.Current.Session is null, and this causes some big problems down the line when the default session storage is initialized. I'm guessing this may have to be initialized lazily?

@riteshrao
Copy link
Owner

Can you post sample code that shows this behavior? How are you configuring session storage, using NCommon.Configure or manual configuration?

@dplaskon
Copy link
Author

I can try to knock together a quick sample of this (the bootstrapping for my app is a little complicated/layered - so it's not really practical for me to post an excerpt here). I am using the fluent configure interface - nothing manual. I'd imagine a repo might be as simple as attempting to configure (standard) session storage from the Application_Start method in Global.asax. Since there is no HttpContext.Current.Session object available at this time, I'd expect you to see the same null ref error I was encountering.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants