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

Troubles with cookies

Hi,

I've some troubles using cookies in my ASP.NET application (C#).
I write a cookie in a page which is in the /login subfolder of the web and I
set an appropriate expire date. But if I intend to read that cookie from
other pages which lie directly at the root folder of the web app, I only get
an empty value and the expire date "1/1/1". What is wrong? Can't I read all
cookies of the web no matter where they were set? Can anyone help me?

Azat
Nov 19 '05 #1
1 964
Usually when you issue a cookie, it's available site-wide. The Path property
indicates what level in the app the cookie belongs to and it defaults to
"/", which means the cookie is available site wide.

I'm wondering if either the client has disabled cookies or if the time on
the client machine is out of synch with the server.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi,

I've some troubles using cookies in my ASP.NET application (C#).
I write a cookie in a page which is in the /login subfolder of the web
and I
set an appropriate expire date. But if I intend to read that cookie
from
other pages which lie directly at the root folder of the web app, I
only get
an empty value and the expire date "1/1/1". What is wrong? Can't I
read all
cookies of the web no matter where they were set? Can anyone help me?
Azat


Nov 19 '05 #2

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

Similar topics

2
by: Damien | last post by:
Hi to all, I'm currently re-designing our intranet : nice and lean CSS2, cleaned-up PHP 4.3.7, better-normalized MySQL ;o). So I've started using the $_SESSION variable instead of register_globals...
1
by: Ben Hearsum | last post by:
I'm confused about the way Cookie.load outputs cookies. Is there a way I can tell it to give me the value of a key? I set my cookie like this: mycookie = Cookie.SimpleCookie() mycookie =...
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
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...
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: Owen | last post by:
I have a web app that is a mixture of ASP and ASP.NET pages. Largely the only data passed between them is via the querystring, or by reading from a database. However there is a requirement for...
0
by: csgraham74 | last post by:
Hi, Im trying to make changes to an appliction that i inherited. i have set several cookies with different small values from XML. i get to a piece of code where i response.redirect to another...
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?
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:
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.