Session in multiple Projects

Results 1 to 2 of 2

Thread: Session in multiple Projects

  1. #1
    Join Date
    Dec 1969

    Default Session in multiple Projects

    Hiya,<BR><BR>If I&#039;m using Session ("UserName") in different pages, this works fine. But If I work with different projects (in 1 solution), I can&#039;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>Henri

  2. #2
    Join Date
    Dec 1969

    Default RE: Session in multiple Projects

    As far as I know, each project in .NET has it&#039;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&#039;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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts