locked
Http Handler and Cookies RRS feed

  • Question

  • User-895779150 posted

    I have two websites say WEB A and WEB B

    WEB B contains a http handler .ashx file

    WEB A calls this via a javascript call.

    I want the http handler to look up cookies that belong to WEB B's domain is this possible?

    Friday, June 22, 2007 3:22 AM

Answers

  • User-233570146 posted

    I get you - so WEB B would store the cookie in the first place.

    I guess the problem then becomes the fact that WEB A is making a request to WEB B in a browser-independent way, but the cookie is stored on the user machine. As the request is out of context the cookie isn't retrievable. (As it would be if the request was made from the client machine...)

    Normal

    Cookie -- Client -- Website

    WEB A/B

    Cookie -- Client -- Website -- Website

    Where "--" is the request.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 22, 2007 6:48 AM

All replies

  • User-233570146 posted

    I think you'll find that cookies are domain-safe, which means WEB B can't read cookies from WEB A.

    You'll need to pass the data in another way - perhaps store the data on the server and pass a token that you can use to lookup the data to WEB B.

    Friday, June 22, 2007 3:36 AM
  • User-895779150 posted

    no no WEB B reads cookies from his own domain.. then returns a vaule to WEB A

     

    Friday, June 22, 2007 3:58 AM
  • User-233570146 posted

    I get you - so WEB B would store the cookie in the first place.

    I guess the problem then becomes the fact that WEB A is making a request to WEB B in a browser-independent way, but the cookie is stored on the user machine. As the request is out of context the cookie isn't retrievable. (As it would be if the request was made from the client machine...)

    Normal

    Cookie -- Client -- Website

    WEB A/B

    Cookie -- Client -- Website -- Website

    Where "--" is the request.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 22, 2007 6:48 AM