use both InProc session and SQL server session in the same app
My web application has 2 types of users: non-authenticated visitors and authenticated customers. I'd like the pages that visitors see to work with InProc session and, as soon as a user moves to the the login page, create a new session that works using SQL server session mode.
Is this possible and if so, 开发者_如何学运维how is it implemented?
Thanks for your suggestions.
You can only have one sessionMode per Application (Virtual Directory).
You can make 2 separate applications with single-sign-on , to the user it would look like 1 Application.
That is not 100% the same, authenticated users that visit the public pages would use InProc. Up to you if that matters.
On the other hand, are you sure this is worth the effort at all? You can't use the Session for data in a multi-server + InProc scenario anyway (that may depend on your IP setup). And storing (small amounts of) data in the SqlServer shouldn't be much of a problem.
精彩评论