views:

114

answers:

1

Greetings, in my ASP.NET MVC application I've created a custom MembershipProvider. It works fine, however when user is successfully logged, I would like to create an Operator object and make it possible to access this object on every controller and view. I was thinking about session to do this but when session expires this object is null but user that had been logged using MembershipProvider is still logged in. Is there any way I can store my Operator object in MembershipProvider and access it on every controller and view I need?

A: 

Maybe you should use the ApplicationState instead of the SessionState? Or define an action filter which checks if the session is new and then reloads all needed data for the logged-in user.

Olaf Watteroth