Setting cookie on remote machine (web service?)

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Setting cookie on remote machine (web service?)

    Is it possible to use a web service to set a cookie on the domain that the web
    service is executed on? I need to set a cookie for siteA from siteB, and then
    be able to recall the value of the siteA cookie from siteB at a later time.
    (both of these sites are under my control so if any special configuration is
    needed to do this then it is do-able).

    tphethean Guest

  2. Similar Questions and Discussions

    1. filecopy from remote machine to local machine
      Hi, I am tryin to copy a tar file from remote machine to local machine using Net:Telnet. I am using the following logic : my(@Out) =...
    2. Setting cookie with web service
      Hi, Is it possible to use a web service to set a cookie on the domain that the web service is executed on? I need to set a cookie for siteA from...
    3. forms authentication-but do not write cookie to client machine
      Hi I am trying to set up an asp.net application where I want the client to have to provide password and user name everytime so do not want to put the...
    4. Setting folder permissions on remote machine / remote domain
      Hello there, I have the following problem: I have Machine A which runs my website. I have Machine B which holds folders for users. Machine A...
    5. [PHP] cookie not setting in IE
      --- "Chris W. Parker" <cparker@swatgear.com> wrote: Can you show us the HTTP transaction using ethereal or something? Chris ===== Become a...
  3. #2

    Default Re: Setting cookie on remote machine (web service?)

    I don't think so. If the web service is operating "behind the scenes",
    meaning that the browser never directly calls it as a URL, then I don't think
    you could set a cookie from that domain. They only way you could share the
    cookies is if the two sites share a root domain name and you have domain
    cookies activated....but you still would have to have the browser visit both
    sites I think.

    Bryan


    blewis Guest

  4. #3

    Default Re: Setting cookie on remote machine (web service?)

    So siteA is making a call to siteB, right? If you do a cfhttp from a to b, the
    respsonse headers will have all the cookie values (after the cfhttp call, dump
    the cfhttp variable to see what i mean). You can parse these out and store
    them somewhere so they will persist, say a text file. Then on subsequent calls
    to siteB, you would need to set these values in the request header, using
    cfhttp again you can set header or cookie values using cfhttpparam. (Using the
    values from the above text file) The web service on siteB would just set the
    cookies and read the cookie values as it normally would. I use a similar
    system for some scheduled task calls, where I need to have the scheduled task
    be the same user/login to another server across multple scheduled task. The
    tasks actually run through a wrapper, that has a cfide/cftoken hard coded,
    those get put into the header before my cfhttp call to the other server.
    Hence, I have the same user (cfid/cftoken) making calls to the other server.

    byron1021 Guest

  5. #4

    Default Re: Setting cookie on remote machine (web service?)

    byron1021, that idea sounds workable so i will give that a try. Mind if i post
    back here with any questions? Regarding the order of the calls, they can
    happen either way. we've effectively got 3 sites (more to come) which share
    authentication method via a web service on central authentication domain.
    Session data is then stored in a database to persist the sessions, but to get
    at the session data i need all the sites to be able to retreive their session
    id. (I could pass it through url or similar, but this would mean you couldnt
    just browse to the site and would have to follow routes we defined - also not
    too secure).

    tphethean Guest

  6. #5

    Default Re: Setting cookie on remote machine (web service?)

    Ok i'm trying this code: <cfhttp method='post'
    url='http://testcold7.ifslearning.com/cftest/session/cookie.cfm'> <cfhttpparam
    type='cookie' name='mycookie' value='#mylogin.sessionid#'> </cfhttp> where
    mylogin.sessionid is the value of a structure i want to store in the cookie.
    However it doesnt seem to be setting any cookie when i call it - any ideas?

    tphethean Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139