473,569 Members | 2,845 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 889
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/(" + SessionSessionI D +
")/mypage.aspx"

--
Ben Strackany
www.developmentnow.com
"Vishal" <an*******@disc ussions.microso ft.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/(" + SessionSessionI D +")/mypage.aspx"

--
Ben Strackany
www.developmentnow.com
"Vishal" <an*******@disc ussions.microso ft.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
3321
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 sends them on to index.php. However, this means that if someone goes straight to one of the pages on my site that requires a Session ID to allow...
5
1409
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 tp. The line above is one record, the company names will differ (but are
3
1453
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 the application via another pc in the network, the login page redirects to itself even though the correct passwd and usename is entered. I did a...
2
1254
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 the application via another pc in the network, the login page redirects to itself even though the correct passwd and usename is entered. I did a...
2
1184
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 SP2 but that does not work for me... Here is what my machine.config looks like: <sessionState mode="InProc" cookieless="true" timeout="20"/> ...
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 users or save any data. If the application crashes or user exits the program they should simply start again. Pretty basic. All interactions are...
0
1397
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 LASTNAME DATE OF BIRTH And i finished it but there is little prob: it don't output date of birth! I thinkt about the prob and...
25
2417
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 In (no actual validation is performed), and then move around the other pages and/or keep refreshing the pages it will eventually display something...
10
1976
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 properly, basically the session variables arent being carried over pages, except, and this is strange, in safari. When i echo the session variables on...
0
7612
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7922
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7668
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5509
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5218
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
936
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.