cookies for domains.

A

Ashish

hi guys,
Iam creating a web application that is going to be split between two
domains, i need to connect sessions of the same user between domains.

I can see that when the reqyest goes from one domain to another, the
asp.net session id cookie value changes ..

Is it possible for me to write a cookie value from one domain for
another domain ?
for example when the user is going from X domain to Y domain, i write a
cookie for Y domain, and read that cookie in Y domain, then i can
recreate the session values back from database..

I tried adding a cookie for Y domain from X domain, but i dont see it in
the cookie collection on Y domain.

any help would be appreciated ...

thanks
 
B

Bruce Barker

you can only share cookies between domains if they have the same root

site1.mydomain.com
site2.mydomain.com

can share a cookie assigned to domain "mydomain.com". if you don't have a
common domain root, then you have to get trickery. here you use the spyware
techniques.

1) create a cookie session database
2) if the page needs to create a cookie, point it to cookie session

on your entry pages add img calls for all other sites

<img src="othersite.com/nullimage.aspx?s=<%cookieid %>">

nullimage.aspx should return a null gif, and create a cookie on the
other site with the sameid

3) get the cookie info from the cookie database.


-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top