473,503 Members | 1,648 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session Prob

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
Nov 19 '05 #1
2 886
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"

--
Ben Strackany
www.developmentnow.com
"Vishal" <an*******@discussions.microsoft.com> wrote in message
news:0e****************************@phx.gbl...
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

Nov 19 '05 #2
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

-----Original Message-----
Well, the session is normally tied to a cookie, which is normally tied to aspecific domain name. So sessions don't normally cross domain boundaries bydesign.

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

You might also be able to share session information by using cookielesssessions, and making sure to include the session id in the URL when you jumpbetween domain names, e.g. if you want to jump from bla.com tohttp://secure.bla.com/vdir/mypage.aspx, you'd actually use this link:
strLink = "http://secure.bla.com/vdir/(" + SessionSessionID +")/mypage.aspx"

--
Ben Strackany
www.developmentnow.com
"Vishal" <an*******@discussions.microsoft.com> wrote in messagenews:0e****************************@phx.gbl...
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

.

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3309
by: Jonathan | last post by:
I use a Session ID to remember a user that's logged in on my site, which works pretty well for the most part, because index.html sends them to a page (index0.php) that starts the session and then...
5
1408
by: Brandon | last post by:
Greetings, I have a database with records that contain data like the following: "vendor" - "phone number" - "city", "state" "problem." For example: xyzcompany - 800-123-4567 - new york, ny...
3
1450
by: ywz | last post by:
Hi All, I built a web application using cookieless session. It merely checks for the session variable value upon login. This method works fine on the host pc. However, when i try to access...
2
1248
by: ywz | last post by:
Hi All, I built a web application using cookieless session. It merely checks for the session variable value upon login. This method works fine on the host pc. However, when i try to access...
2
1174
by: Guns | last post by:
we have a session variable object that gets lost in the same event call. I have windows XP Pro as my os with the latest service pack... I have the .net 1.1 SP1 installed. Even tried installing 1.0...
5
548
by: Sean | last post by:
Problem with sessions I have created an application without concern for sessions. As it turns out I think that might be my undoing. What I have: I have an online quiz. I don’t need to know...
0
1390
Savage
by: Savage | last post by:
I'm making for fun a simple program which format a input file.Input file sustain of person name,lastname and date of birth.Output file si supposed to be forammted as following: NAME ...
25
2405
by: Jonno | last post by:
Hi I am having a problem with session vars being propagated between pages on this site: http://www.meettheancestors.com/sessiontest/index.php If you enter any user id and password and click Log...
10
1970
by: isynclere | last post by:
Hi all, I am stuck with a very strange session prob. Developing on locahost. Have just gone back to a project I was working on to check all is ok and the login function is no longer working...
0
7072
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7271
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7319
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6979
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5570
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4998
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
373
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.