Session in multiple Projects

Felix

New Member
Hiya,<BR><BR>If I'm using Session ("UserName") in different pages, this works fine. But If I work with different projects (in 1 solution), I can't use the session variables made in another project. How can I solve this?<BR><BR>So in Project A I create Session ("UserName") = "Henri"<BR>This works in webpages in Project A, but Session ("UserName") is empty if I try it on a page in another project (but in the same solution).<BR><BR>How to solve??<BR><BR>HenriAs far as I know, each project in .NET has it's own memory scope (same as ASP), and that memory scope is inaccessible to the other applications, even if they are all part of the same solution.<BR>This is of course using the InProc Session State method. (default)<BR><BR>I think (though I've yet to try it) that you can share session state variable values across projects by setting them up to use an Out of Process Session State model (probably SQL Server) for all the applications.<BR><BR>Otherwise you can share information from one application to another by using cookies, a database server, etc.<BR><BR>Hope that helps.
 
Back
Top