By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,099 Members | 2,156 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,099 IT Pros & Developers. It's quick & easy.

pass cookie from one domain to another on the same server

P: n/a
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
Nov 21 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
=?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)
Nov 21 '07 #2

P: n/a
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.

--------------------
>From: =?Utf-8?B?YzY3NjIyOA==?= <be***@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
Nov 22 '07 #3

P: n/a
On Nov 21, 3:47 pm, c676228 <be...@newsgroup.nospamwrote:
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
Nov 24 '07 #4

P: n/a
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.nospamwrote:
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
Nov 26 '07 #5

P: n/a
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/Sho...08989&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==?= <be***@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.nospamwrote:
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
Nov 27 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.