Home All Groups Group Topic Archive Search About

pass cookie from one domain to another on the same server



Author
21 Nov 2007 9:47 PM
c676228
Hi all,
Is there an easier way to handle that? I used Javascript to handle this when
our two domains are hosted on two different servers(on different networks)
and our search engine marketing people don't like the javascript links since
they think the links are not favorable to a search robot.

Now our company is thinking about hosting these two domians on the same
server,
So I am wodering if there is any easy way to do that. Would you provide me
some clues?
Thank you so much.
--
Betty

Author
21 Nov 2007 10:25 PM
Evertjan.
=?Utf-8?B?YzY3NjIyOA==?= wrote on 21 nov 2007 in
microsoft.public.inetserver.asp.general:

> Is there an easier way to handle that?

Please do not use the subjectline as part of your Q.

> I used Javascript to handle
> this when our two domains are hosted on two different servers(on
> different networks)

Cookies exist on the client per domain, and cannot be passed to another
domain.

The cookie content string can be palced on two domains seperately.

> and our search engine marketing people don't like
> the javascript links since they think the links are not favorable to a
> search robot.

Sorry? Does this have anything to do with your Q?

> Now our company is thinking about hosting these two domians on the
> same server,
> So I am wodering if there is any easy way to do that. Would you
> provide me some clues?

What you can do with two domains on two servers, you can do with two
domains on one server. Cookies do not live on a server.

Any reason why this sould not be the case?


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Author
22 Nov 2007 5:17 AM
Steven Cheng[MSFT]
Hi Betty,

As for the "copy cookie from one domain to another", I'd like to confirm
the exact things you want to achieve:

** cookie is stored on client machine and whenever browser visit a site, it
will send the cookies (belong to that site based on the server domain name)
to server.

** when you change cookies, that means you change the cookies at
server-side and it is until the response reach client will the cookies data
actually be updated in client store

** For cookies, your server-side code(ASP or ASP.NET) can only add/remove
cookie within its own domain(or the same main domain and different sub
domain).

Therefore, normally, manipulate cookies under same top domain (and
different sub domains) are directly supported. However, if you want to
manipulate cookies for different top domain in single application, you will
need particular machnism setup in your context(for all those
applications/sites that want to share cookies). Here is an article
discussing something about this:

#Sharing Cookies Across Domains
http://support.softartisans.com/kbview_666.aspx

Hope this helps some.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



This posting is provided "AS IS" with no warranties, and confers no rights.





--------------------
Show quote
>From: =?Utf-8?B?YzY3NjIyOA==?= <betty@newsgroup.nospam>
>Subject: pass cookie from one domain to another on the same server
>Date: Wed, 21 Nov 2007 13:47:00 -0800

>
>Hi all,
>Is there an easier way to handle that? I used Javascript to handle this
when
>our two domains are hosted on two different servers(on different networks)
>and our search engine marketing people don't like the javascript links
since
>they think the links are not favorable to a search robot.
>
>Now our company is thinking about hosting these two domians on the same
>server,
>So I am wodering if there is any easy way to do that. Would you provide me
>some clues?
>Thank you so much.
>--
>Betty
>
Author
24 Nov 2007 10:52 AM
Brynn
On Nov 21, 3:47 pm, c676228 <be...@newsgroup.nospam> wrote:
> Hi all,
> Is there an easier way to handle that? I used Javascript to handle this when
> our two domains are hosted on two different servers(on different networks)
> and our search engine marketing people don't like the javascript links since
> they think the links are not favorable to a search robot.
>
> Now our company is thinking about hosting these two domians on the same
> server,
> So I am wodering if there is any easy way to do that. Would you provide me
> some clues?
> Thank you so much.
> --
> Betty

I would also be interested in knowing what you are storing in those
cookies.

I have changed almost everything over to server side data storage,
including shopping carts, etc... all on my servers.

The only thing the cookie does for me is keeps them unique for me. If
I wanted them to be on 2 domains ... during a login process I would
simply have a data pass to a cookie on the other domain. I like to use
invisible iframes in my pages for passes like that.

I had one project that I wanted to keep a session alive between 2
sites even ... I think I used a 1px by 1px iframe in the footer of
both websites that was a blank design asp webpage.

Anyway, let us know more about what you are doing between them,

Brynn Curry
Author
26 Nov 2007 4:21 AM
c676228
Hi all,
Thanks for your reply. Here is my case.
Our company initially(about more than 5 years ago) has a web site(domain A)
which is hosted by a company on a lynix system. Later on our company decided
to have some dynamic pages(sales processes) which were written in asp on our
site too. So the company decided to host those pages on a different
domain(domain B) with another hosting company. So when one of our customers
gets on to our page 1  on domain A from a specific agents site, (we always
have a producer code, stored as a cookie, assigned to our specific agent),
and then if this customer's navigation on our domain A lead to a sale on our
domain B, say page 2, then this cookie values need to be carried onto domain
B, so this value could be written into our database and the sales credit will
go to our specific agents.

When we pass our cookie value from domain A to domain B, I used the
javascript. that's why I am asking th question. I am trying to think about
another way which will be better for search engine.
Thank you.
--
Betty


Show quote
"Brynn" wrote:

> On Nov 21, 3:47 pm, c676228 <be...@newsgroup.nospam> wrote:
> > Hi all,
> > Is there an easier way to handle that? I used Javascript to handle this when
> > our two domains are hosted on two different servers(on different networks)
> > and our search engine marketing people don't like the javascript links since
> > they think the links are not favorable to a search robot.
> >
> > Now our company is thinking about hosting these two domians on the same
> > server,
> > So I am wodering if there is any easy way to do that. Would you provide me
> > some clues?
> > Thank you so much.
> > --
> > Betty
>
> I would also be interested in knowing what you are storing in those
> cookies.
>
> I have changed almost everything over to server side data storage,
> including shopping carts, etc... all on my servers.
>
> The only thing the cookie does for me is keeps them unique for me. If
> I wanted them to be on 2 domains ... during a login process I would
> simply have a data pass to a cookie on the other domain. I like to use
> invisible iframes in my pages for passes like that.
>
> I had one project that I wanted to keep a session alive between 2
> sites even ... I think I used a 1px by 1px iframe in the footer of
> both websites that was a blank design asp webpage.
>
> Anyway, let us know more about what you are doing between them,
>
> Brynn Curry
>
Author
27 Nov 2007 3:17 AM
Steven Cheng[MSFT]
Hi Betty,

Yes, you may need  to look for some other approaches. For share cookie, I
think the last link in my previous reply (below) should be a doable
appraoch:

http://support.softartisans.com/kbview_666.aspx

Hi BeSharp,

As for the D LINQ selection scenario you mentioned, I think it sounds like
what you want to do is a  SQL "LIKE" comparison. For {"...",
"..."}.contains, "contains" actually means that the input parameter exactly
match any of the i tem in collection, that is not substring mapping.  For
substring mapping, you should use SQL "Like" style selection. Here is a web
thread discussing on using "LIKE" query in LINQ:

#using LIKE in DLinq
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=308989&SiteID=1

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.





--------------------
Show quote
>From: =?Utf-8?B?YzY3NjIyOA==?= <betty@newsgroup.nospam>
>Subject: Re: pass cookie from one domain to another on the same server
>Date: Sun, 25 Nov 2007 20:21:01 -0800
>
>Hi all,
>Thanks for your reply. Here is my case.
>Our company initially(about more than 5 years ago) has a web site(domain
A)
>which is hosted by a company on a lynix system. Later on our company
decided
>to have some dynamic pages(sales processes) which were written in asp on
our
>site too. So the company decided to host those pages on a different
>domain(domain B) with another hosting company. So when one of our
customers
>gets on to our page 1  on domain A from a specific agents site, (we always
>have a producer code, stored as a cookie, assigned to our specific agent),
>and then if this customer's navigation on our domain A lead to a sale on
our
>domain B, say page 2, then this cookie values need to be carried onto
domain
>B, so this value could be written into our database and the sales credit
will
>go to our specific agents.
>
>When we pass our cookie value from domain A to domain B, I used the
>javascript. that's why I am asking th question. I am trying to think about
>another way which will be better for search engine.
>Thank you.
>--
>Betty
>
>
>"Brynn" wrote:
>
>> On Nov 21, 3:47 pm, c676228 <be...@newsgroup.nospam> wrote:
>> > Hi all,
>> > Is there an easier way to handle that? I used Javascript to handle
this when
>> > our two domains are hosted on two different servers(on different
networks)
>> > and our search engine marketing people don't like the javascript links
since
>> > they think the links are not favorable to a search robot.
>> >
>> > Now our company is thinking about hosting these two domians on the same
>> > server,
>> > So I am wodering if there is any easy way to do that. Would you
provide me
>> > some clues?
>> > Thank you so much.
>> > --
>> > Betty
>>
>> I would also be interested in knowing what you are storing in those
>> cookies.
>>
>> I have changed almost everything over to server side data storage,
>> including shopping carts, etc... all on my servers.
>>
>> The only thing the cookie does for me is keeps them unique for me. If
>> I wanted them to be on 2 domains ... during a login process I would
>> simply have a data pass to a cookie on the other domain. I like to use
>> invisible iframes in my pages for passes like that.
>>
>> I had one project that I wanted to keep a session alive between 2
>> sites even ... I think I used a 1px by 1px iframe in the footer of
>> both websites that was a blank design asp webpage.
>>
>> Anyway, let us know more about what you are doing between them,
>>
>> Brynn Curry
>>
>
Author
29 Nov 2007 6:15 PM
c676228
Hi Steven,
You are right. The link you provided is dorable for my case. In order to
replace all javascript coded links from domain A, I need to replace all the
html pages on domain A to .asp page, so I can pass cookie value from query
string from domain A to domain B. This will be beneficail to site traffic
since a crawler will index those pages.

Thank you so much for your great help
--
Betty


Show quote
"Steven Cheng[MSFT]" wrote:

> Hi Betty,
>
> Yes, you may need  to look for some other approaches. For share cookie, I
> think the last link in my previous reply (below) should be a doable
> appraoch:
>
> http://support.softartisans.com/kbview_666.aspx
>
> Hi BeSharp,
>
> As for the D LINQ selection scenario you mentioned, I think it sounds like
> what you want to do is a  SQL "LIKE" comparison. For {"...",
> "..."}.contains, "contains" actually means that the input parameter exactly
> match any of the i tem in collection, that is not substring mapping.  For
> substring mapping, you should use SQL "Like" style selection. Here is a web
> thread discussing on using "LIKE" query in LINQ:
>
> #using LIKE in DLinq
> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=308989&SiteID=1
>
> Hope this helps.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>
>
>
> --------------------
> >From: =?Utf-8?B?YzY3NjIyOA==?= <betty@newsgroup.nospam>
> >Subject: Re: pass cookie from one domain to another on the same server
> >Date: Sun, 25 Nov 2007 20:21:01 -0800
> >
> >Hi all,
> >Thanks for your reply. Here is my case.
> >Our company initially(about more than 5 years ago) has a web site(domain
> A)
> >which is hosted by a company on a lynix system. Later on our company
> decided
> >to have some dynamic pages(sales processes) which were written in asp on
> our
> >site too. So the company decided to host those pages on a different
> >domain(domain B) with another hosting company. So when one of our
> customers
> >gets on to our page 1  on domain A from a specific agents site, (we always
> >have a producer code, stored as a cookie, assigned to our specific agent),
> >and then if this customer's navigation on our domain A lead to a sale on
> our
> >domain B, say page 2, then this cookie values need to be carried onto
> domain
> >B, so this value could be written into our database and the sales credit
> will
> >go to our specific agents.
> >
> >When we pass our cookie value from domain A to domain B, I used the
> >javascript. that's why I am asking th question. I am trying to think about
> >another way which will be better for search engine.
> >Thank you.
> >--
> >Betty
> >
> >
> >"Brynn" wrote:
> >
> >> On Nov 21, 3:47 pm, c676228 <be...@newsgroup.nospam> wrote:
> >> > Hi all,
> >> > Is there an easier way to handle that? I used Javascript to handle
> this when
> >> > our two domains are hosted on two different servers(on different
> networks)
> >> > and our search engine marketing people don't like the javascript links
> since
> >> > they think the links are not favorable to a search robot.
> >> >
> >> > Now our company is thinking about hosting these two domians on the same
> >> > server,
> >> > So I am wodering if there is any easy way to do that. Would you
> provide me
> >> > some clues?
> >> > Thank you so much.
> >> > --
> >> > Betty
> >>
> >> I would also be interested in knowing what you are storing in those
> >> cookies.
> >>
> >> I have changed almost everything over to server side data storage,
> >> including shopping carts, etc... all on my servers.
> >>
> >> The only thing the cookie does for me is keeps them unique for me. If
> >> I wanted them to be on 2 domains ... during a login process I would
> >> simply have a data pass to a cookie on the other domain. I like to use
> >> invisible iframes in my pages for passes like that.
> >>
> >> I had one project that I wanted to keep a session alive between 2
> >> sites even ... I think I used a 1px by 1px iframe in the footer of
> >> both websites that was a blank design asp webpage.
> >>
> >> Anyway, let us know more about what you are doing between them,
> >>
> >> Brynn Curry
> >>
> >
>
>

AddThis Social Bookmark Button