Session Prob

  • Thread starter Thread starter Vishal
  • Start date Start date
V

Vishal

Hello,

Lets say I have a domain name like this: bla.com and
another one like secure.bla.com. Both points to the same
server. When I store a session in bla.com and go then to
secure.bla.com then the session is not anymore available.
Can somebody tell me what I can do to make it available on
both?

Thanks
 
Well, the session is normally tied to a cookie, which is normally tied to a
specific domain name. So sessions don't normally cross domain boundaries by
design.

One way to get around this is to store the user's information in the Cache
object instead of Session object. As long as both web sites share the same
Application Pool (they probably do), they'll be able to read the same
information from the Cache.

You might also be able to share session information by using cookieless
sessions, and making sure to include the session id in the URL when you jump
between domain names, e.g. if you want to jump from bla.com to
http://secure.bla.com/vdir/mypage.aspx, you'd actually use this link:

strLink = "http://secure.bla.com/vdir/(" + SessionSessionID +
")/mypage.aspx"
 
Thanks Ben,

but the problem is that I want to store a complete
dataset. In my understanding I can only store strings into
the cache. Is that correct?

Thanks, Vishal
 
Back
Top