cookies 101

Discussion in 'ASP General' started by shank, Nov 19, 2008.

  1. shank

    shank Guest

    I have a website www.MyWebsite.com that requires cookies to work properly.
    No problem. I write and read cookies without issue.

    Problem: I'm using alternate domain names via GoDaddy and use masking. With
    masking, the cookies no longer work as planned.

    Example: Land on the site with www.MySite.com, then click any link to get
    to, say, www.MyWebsite.com/page1.asp that depends on a cookie originating
    from www.MyWebsite.com and I get an error.

    I guess what I'm asking is how do I write a cookie for www.MyWebsite.com
    while using domain name www.MySite.com to find the site?

    thanks
     
    shank, Nov 19, 2008
    #1
    1. Advertising

  2. shank

    Evertjan. Guest

    shank wrote on 19 nov 2008 in microsoft.public.inetserver.asp.general:

    > I have a website www.MyWebsite.com that requires cookies to work
    > properly. No problem. I write and read cookies without issue.
    >
    > Problem: I'm using alternate domain names via GoDaddy and use masking.
    > With masking, the cookies no longer work as planned.
    >
    > Example: Land on the site with www.MySite.com, then click any link to
    > get to, say, www.MyWebsite.com/page1.asp that depends on a cookie
    > originating from www.MyWebsite.com and I get an error.
    >
    > I guess what I'm asking is how do I write a cookie for
    > www.MyWebsite.com while using domain name www.MySite.com to find the
    > site?


    Cookies exist on the browser,
    so what is the classic ASP connection of this Q?

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Nov 19, 2008
    #2
    1. Advertising

  3. "shank" <> wrote in message
    news:...
    >I have a website www.MyWebsite.com that requires cookies to work properly.
    >No problem. I write and read cookies without issue.
    >
    > Problem: I'm using alternate domain names via GoDaddy and use masking.
    > With masking, the cookies no longer work as planned.
    >
    > Example: Land on the site with www.MySite.com, then click any link to get
    > to, say, www.MyWebsite.com/page1.asp that depends on a cookie originating
    > from www.MyWebsite.com and I get an error.
    >
    > I guess what I'm asking is how do I write a cookie for www.MyWebsite.com
    > while using domain name www.MySite.com to find the site?
    >
    > thanks


    You can't. Could you imagine what would happen if code from one domain
    could read and/or modify cookies to be used by another. Joe public visits
    www.betyourinterestedinthis.com which then fiddles with cookies belonging
    to www.mybankaccount.com. Not a good idea.


    --
    Anthony Jones - MVP ASP/ASP.NET
     
    Anthony Jones, Nov 19, 2008
    #3
  4. shank

    p byers Guest

    shank wrote:

    > I have a website www.MyWebsite.com that requires cookies to work properly.
    > No problem. I write and read cookies without issue.
    >
    > Problem: I'm using alternate domain names via GoDaddy and use masking. With
    > masking, the cookies no longer work as planned.
    >
    > Example: Land on the site with www.MySite.com, then click any link to get
    > to, say, www.MyWebsite.com/page1.asp that depends on a cookie originating
    > from www.MyWebsite.com and I get an error.
    >
    > I guess what I'm asking is how do I write a cookie for www.MyWebsite.com
    > while using domain name www.MySite.com to find the site?
    >
    > thanks


    Try passing the values as "hidden" form variables

    Just a clue - I do it often

    Pete (Northolt UK)
     
    p byers, Nov 20, 2008
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kivak Wolf

    Drop down list 101

    Kivak Wolf, Oct 12, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    331
    Ken Cox [Microsoft MVP]
    Oct 12, 2005
  2. TheCoder
    Replies:
    1
    Views:
    380
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Dec 2, 2005
  3. =?Utf-8?B?am9uZWZlcg==?=

    101 Question - Passing a value from one page to another

    =?Utf-8?B?am9uZWZlcg==?=, Dec 22, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    439
    uttara
    Dec 22, 2005
  4. Replies:
    0
    Views:
    622
  5. _Who
    Replies:
    7
    Views:
    2,686
Loading...

Share This Page