Whoops, forgot about that part.  ColdFusion uses cookies to determine which
session belongs to which user.  You'd have to rewrite those cookies so that
they are shared across the 2 domains (which you can do since the two domains
appear to be subdomains of the same common domain.

Basically, you'd have to use code like the following:

<CFIF IsDefined("Cookie.CFID") AND IsDefined("Cookie.CFTOKEN")>
        <CFSET tCFID = Cookie.CFID>
        <CFSET tCFTOKEN = Cookie.CFTOKEN>
        <CFCOOKIE NAME="CFID" VALUE="#tCFID#" DOMAIN=".mywebsite.com">
        <CFCOOKIE NAME="CFTOKEN" VALUE="#tCFTOKEN#" DOMAIN=".mywebsite.com">
</CFIF>

Optionally, you can also include the other CFCOOKIE attributes.  As is, the
session will disappear as soon as the user closes her browser.  To make the
session a bit more persistent, include the EXPIRES attribute.

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


> -----Original Message-----
> From: Sam Roach [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 15, 2003 4:22 PM
> To: CF-Talk
> Subject: RE: session variables
>
>
> Both domains are on the same server.  But when I go between the domains it
> starts a new session.  What do I have to add to the
> application.cfm file to
> make this work?
>
> -- Sam
>
> <CFAPPLICATION NAME="MYCART"
>       SESSIONMANAGEMENT="Yes"
>       SETCLIENTCOOKIES="Yes"
>       SESSIONTIMEOUT="#CreateTimeSpan(1, 0, 0, 0)#"
>       APPLICATIONTIMEOUT="#CreateTimeSpan(1, 0, 0, 0)#"
>       CLIENTMANAGEMENT="Yes"
>       CLIENTSTORAGE="Cookie">
>
> <CFLOCK TIMEOUT="30"
>       THROWONTIMEOUT="Yes"
>       NAME="#Application.ApplicationName#"
>       TYPE="Exclusive">
>       <CFIF NOT #ISDEFINED("Application.Started")#>
>               <CFLOCK TIMEOUT="10"
>                               THROWONTIMEOUT="Yes"
>                               NAME="#Session.SessionID#"
>                               TYPE="Exclusive">
>                       <CFSET APPLICATION.STARTED = TRUE>
>               </CFLOCK>
>       </CFIF>
> </CFLOCK>
>
> <CFLOCK TIMEOUT="10"
>               THROWONTIMEOUT="Yes"
>               NAME="#Session.SessionID#"
>               TYPE="ReadOnly">
>       <CFIF NOT ISDEFINED("Session.Started")>
>               <CFSET SESSION.STARTED = TRUE>
>               <CFSET SESSION.ITEM = "">
>               <CFSET SESSION.QUANTITY = "">
>               <CFSET SESSION.KEYCODE = "">
>       </CFIF>
> </CFLOCK>
>
>
> -----Original Message-----
> From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 15, 2003 11:00 AM
> To: CF-Talk
> Subject: RE: session variables
>
>
> You could either cheat and turn the SESSION variable into a URL
> variable or
> you could have both domains serviced by the same CF App Server, both using
> the same Application name (specified in the Application.cfm file).
>
> --
> Mosh Teitelbaum
> evoch, LLC
> Tel: (301) 625-9191
> Fax: (301) 933-3651
> Email: [EMAIL PROTECTED]
> WWW: http://www.evoch.com/
>
>
> > -----Original Message-----
> > From: Sam Roach [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, January 15, 2003 12:20 PM
> > To: CF-Talk
> > Subject: session variables
> >
> >
> > Is there a way to pass session variables across a domain?  Ex. from
> > www.mywebsite.com to www1.mywebsite.com?
> >
> > -- Sam
> >
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to