473,396 Members | 2,093 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,396 software developers and data experts.

Cookies and subdomains and IE6

I'm loosing cookies in IE6 (works in firefox) when with the following
steps...

step 1. set a cookie in one domain, in an .aspx.cs codebehind...
in www.domain.com/subdomain1/page1.aspx
HttpContext.Current.Response.Cookies.domain = "domain.com";
HttpContext.Current.Response.Cookies.Add(cookie);

step 2. Form post to an asp page in another
subdomain..www.domain.com/subdomain2/page2.asp

step 3. From www.domain.com/subdomain2/page2.asp, post form values back
to
www.domain.com/subdomain1/page1.aspx

step 4. Try to access cookie from step one but cookie is lost/null, so
following line causes 'object reference not found error'.

string string1 =
HttpContext.Current.Request.Cookies["cookiename"].value;

I already checked to make sure all urls are http, not https.

Does anybody know why this works in firefox, but not IE? Also, works
in IE if
try form post from localhost/subdomain1/page1.aspx to
www.domain.com/subdomain1/page2.aspx, then formpost back to
localhost/subdomain1/page1.aspx.

Thanks!

Sep 22 '06 #1
1 1967
On 22 Sep 2006 16:12:40 -0700, "stillworkingfortheman" <ju*****@gmail.com>
wrote:
>I'm loosing cookies in IE6 (works in firefox) when with the following
steps...

step 1. set a cookie in one domain, in an .aspx.cs codebehind...
in www.domain.com/subdomain1/page1.aspx
HttpContext.Current.Response.Cookies.domain = "domain.com";
HttpContext.Current.Response.Cookies.Add(cookie);

step 2. Form post to an asp page in another
subdomain..www.domain.com/subdomain2/page2.asp

step 3. From www.domain.com/subdomain2/page2.asp, post form values back
to
www.domain.com/subdomain1/page1.aspx

step 4. Try to access cookie from step one but cookie is lost/null, so
following line causes 'object reference not found error'.

string string1 =
HttpContext.Current.Request.Cookies["cookiename"].value;

I already checked to make sure all urls are http, not https.

Does anybody know why this works in firefox, but not IE? Also, works
in IE if
try form post from localhost/subdomain1/page1.aspx to
www.domain.com/subdomain1/page2.aspx, then formpost back to
localhost/subdomain1/page1.aspx.

Thanks!
Try microsoft.public.dotnet.framework.aspnet
Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
Sep 23 '06 #2

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

Similar topics

2
by: lostman | last post by:
Hi, I need to make a little script that keep the info of a user on my site. I use Cookie to make this work, but the problem i have is : We have a lot of Sub-section on our site...
1
by: Jose Olivas | last post by:
I am setting a cookie on a subdomain: http://store1.mydomain.com Then the store takes me to a shopping cart that is at: http://shopping.mydomain.com Somewhere the following code (taken and...
1
by: steve | last post by:
Hi I am writing an application which ideally requires the creation of subdomains dynamically via asp. However I want all the subdomains to point to 1 asp file, which I wish to use to figure out...
3
by: craigkenisston | last post by:
In an application I'm developing I will be using subdomains in the main website to hold some sections of the sites. There will be many serverside generated links that will point to this...
4
by: radiax | last post by:
Is there a way to associate or bind a subdomain to a tcp sockets under .net framework (vb.net / c#). I know ip address can be used when using sockets, but the problem is the ip address is shared...
1
by: Hans Kesting | last post by:
Hi, Is it possible to share sessions between subdomains? Say: the user logs in at www.company.com, and is redirected to my.company.com. This is a different url for the same application. Can I...
8
by: Kenny Lai | last post by:
hey, Is there a way to communicate between iframes on different subdomains? e.g. from one.dot.com to two.dot.com? there is a security access restriction passing javascript commands between...
3
by: Jonathan Wood | last post by:
Perhaps someone who understand Web hosting can offer some insight into this. I have several sites hosted at http://www.crystaltech.com. There were highly recommended and seem pretty good. But...
3
by: akadeco | last post by:
Hi Could anyone give me some pointers on how to remove subdomains from a string? For example: If the string was bytes.com, it would stay bytes.com If it was subdomain.bytes.com, it would...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.