Thursday, March 29, 2012

Session Variable across applications

If I have multiple applications inside a website, will session variables
persist if I like between the two applications?That's 'link' between two applications.
DogBoy,

I'd say yes

Cheers Al
As long as they're under the same website in IIS.
This doesn't seem to be working, the session variable is coming up null when I try to
jump applications in the same website. Any ideas?
Damn, looks like I was wrong. You can not share session variables across apps. You will need to pass them across using encrypted querystrings, post requests, and the like.
I'm not sure I fully understand what you're trying to do. This is what I think you're doing, let me know if this is not right -

your main site has a url like this

www.mysite.com

Note: This assumes you don't have extra domain names set up, trying to keep it simple!

To access app 1 you'd enter www.mysite.com/app1
To access app 1 you'd enter www.mysite.com/app2

If this is what you're doing then I know that cookies and session variables can definitely be shared because I'm doing it with a project I'm currently working on.

Cheers Al
That's what I'm trying to do - but the session variables are not jumping apps. The apps are configured in IIS, are yours configured that way or just sub directories?

I was thinking of using cookies, I know they are persistent but apparantly not session variables.
Mine are sub folder under the main site.

So I guess that's the end of that
I was thinking of what aconybeare mentioned here too, but then I realized you're talking about virtual directories, which are basically separate ASP.NET applications.

0 comments:

Post a Comment