Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Losing CFID and CFTOKEN

Status
Not open for further replies.

BBrennan

Programmer
Joined
Mar 1, 2001
Messages
2
Location
US
Help! I have an application that uses client variables. When a user submits a page with an address, it goes to another server that confirms the address information and returns to a specified url with additional address information. Once it gets back to this page all my client variables are dissappearing. (We tried using cookies before and the same thing was happening.) Before they submit the page with the address info I tested the CFID and CFTOKEN and then tested them again when the page returns. When it returns the CFIF and CFTOKEN are different! What is happening and how do I solve this problem? We are using Cold Fusion 4.5 on NT.
 
Heres what I think is happening:

CFID and CFTOKEN are stored on the client machine as cookies whether you use client vars or not. These values are matched by CFAS to session/application/client etc variables in ram so they act kind of like a key. When a request is receieved and these cookies (cfid and cftoken) are not passed with the request then CF thinks its dealing with a new user and generates a new set. Because you are posting to a different server that server cannot read your cookies (cfid and cftoken)because they are from a different domain so it issues new CFID and CFTOKEN values. Now I may be wrong as the server you are issuing it to may not be a coldfusion server and technically the old cfid and cftoken should still be on your machine. WHat I would do is try passing cfid and cftoken to the other server on the url (similar to how tect- tips does sometimes) of the action page so it passed to the new server but you the responding server will also need to pass them back.

HTH
 
Just to add to this just incase make sure you have set the relevant attributtes in the application.cfm tag
 
Thanks,
That's what we did and it works fine now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top