Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

sharing session state between 2 projects

  Asked By: Rabiah    Date: Jun 12    Category: Asp.net    Views: 1052

Anyone know how can i share session state between 2 projects of my solution?



2 Answers Found

Answer #1    Answered By: Bonnie Hughes     Answered On: Jun 12

verttoaspnet.asp for asp3 to asp.NET

is a VB COM object to do the dirty work.

But it may be something similar between 2 .NET apps ?

there is another very simple version at gotdotnetusers but I don' know how
effective it is.

To tell th etruth I'd have guessed differently ... I'd hve thought it would be
to do with httphandlers, httpmodules and httpfactories. They are accessed
earlier in the pipeline than the actual app and are configured in web.config

Session is handled via a module (see machine.config) as are others.

To do what you desire I would have thought you could some httpmodule to get
underneath both your apps and hand them the same session  object or

how exactly I simply couldn't tell you.

But thats the way I would have thought about it if I hadn't searched MSDN.

I have heard that you can do things like override the session handler, replace
it with a custom one, - if you can do that then surely you can send 2 apps he
same one.

Answer #2    Answered By: Percy Morgan     Answered On: Jun 12

I found a way in microsoft newsgroups.
I simple use server.Transfer and it works!
in my application, i have 2 or more virtual folders, one of them acts as a login
application and it must be independent of the others modules.
so... when the user log in, i set the session  with data and then use
server.transfer to the other application and it works

Didn't find what you were looking for? Find more on sharing session state between 2 projects Or get search suggestion and latest updates.