473,405 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

cookies 101

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
Nov 19 '08 #1
3 1978
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)
Nov 19 '08 #2
"shank" <sh***@tampabay.rr.comwrote in message
news:eS**************@TK2MSFTNGP03.phx.gbl...
>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

Nov 19 '08 #3


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)

Nov 20 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Brian Burgess | last post by:
Hi all, Anyone know of any special issues with storing cookies with ASP? I'm trying this with two browsers: One is IE 6.0 with cookies set to 'prompt'. This has been working properly as any...
20
by: Brian Burgess | last post by:
Hi all, Anyone know if this is possible? If so, on which page would the cookie be? .. On the page calling a function defined in the include file? thanks in advance.. -BB
9
by: | last post by:
Is it possible for a user to enable permanent cookies but disable session cookies.....this seems like a contradition yet this is what I appear to be reading in online articles?
1
by: John Taylor-Johnston | last post by:
I'm a University academic looking for a proper definition of JavaScript Cookies. http://www.CollegeSherbrooke.qc.ca/languesmodernes/604-HAE_Grammar_Practice/ I'm trying to decipher what...
6
by: Mark | last post by:
Hi... I've come across some weird bug with Response.Cookies. Or maybe it will be called "by design" but for the life of me I can't figure out what purpose it would serve. If you're setting a...
8
by: CDARS | last post by:
Hi all, I have a confusing question on ASP.NET cookies usage: 1> Response.Cookies("test").value = Now 2> Response.Write(Request.Cookies("test").value) 3> 4> Response.write("<hr>") 5>...
6
by: Stephane | last post by:
Hi, I have a login page where if the user wants his access codes to be saved are set into a cookie. In the logout page, I want to delete those cookies. I tried this and this is not working at...
1
by: Alex Nitulescu | last post by:
I have the following very simple colde (while learning about cookies and session state): Private Sub cmdAddCookie_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...
0
by: Claudio | last post by:
I have a demo app where cookies does not work. The first page create a cookies. The second read the contet. If I browse the pages via IE6.0 the pages does not work. If I browse the pages via...
0
by: rn5a | last post by:
This is how I am creating & then reading cookies: <script runat="server"> Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) 'create cookies Response.Cookies("UserName").Value = "Ron"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.