473,503 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Windows 98 cookie issue

Hi all,

I have a property that stores a value to a cookie and retrieves it if the
cookie exists or returns a default value if it doesn't in my web app.

private static string ID
{
get
{
if(HttpContext.Current.Request.Cookies["ID"] != null)
{
return HttpContext.Current.Request.Cookies["ID"].Value;
}
else
{
return "-1";
}
}
set
{
HttpCookie connectionIDCookie = new HttpCookie("ID", value);
HttpContext.Current.Response.Cookies.Add(IDCookie) ;
}
}

This has worked fine apart from with browsers based on the windows 98 O/S.
If the cookie exists it enters the 'if/else' block but returns a null for
the cookie value. However if I break during debugging at this point and enter
'HttpContext.Current.Request.Cookies["ID"]' into the command window all the
details are returned and when continuing stepping through the code the value
is now returned.
I am a bit stumped at this point as to why this is happening. A solution
would be to store it in a session variable instead but I would like to know
if anyone has any idea why this is happening?

Thanks for looking, Andy
Nov 19 '05 #1
0 731

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

Similar topics

18
8814
by: Paul | last post by:
I link to a web site from an Excel spreadsheet. The page i link to is getCookie.asp which sets a cookie then returns back some html which opens a new window, to the same site but a different page...
6
2085
by: Mark | last post by:
I am designing a game for a forum. When the user has finished playing I need to save their data to a cookie then navigate to a page which holds their score data (I can't have both sets of data on...
7
3005
by: dlinetsky | last post by:
I have a C# web app that uses mixed mode authentication (windows integrated auth. together with formsAuthentication). I would like to have a form that allows users to change their windows...
1
2188
by: Frank | last post by:
Hi all, I am using Forms authentication with login.aspx page as below to issue a ticket, then send the cookie to the client such that next request from the client should bring the credential. ...
9
1944
by: Justin Engelman | last post by:
Hi, I have a website that uses an ISAPI filter that will redirect anyone going to any page on the site to an SSL login page (on a different website with the same root domain) if they do not have...
3
7470
by: Chris Paul | last post by:
I'm having trouble with PHP & PostgreSQL/OpenLDAP/Apache on Windows. I've set this up countless times on BSD (piece of cake) but I'm trying to do this on Windows now so that my developer can work...
15
2108
by: Edwin Knoppert | last post by:
I have searched but info is limitted. In my test app i used a non persistant cookie for forms authentication. slidingExpiration is set to true On run and close and rerun the login remains ok....
1
1584
by: flutetones | last post by:
http://67.189.52.24/~metafusionserver/public_html/training.php Here is a link to my server. I have an issue that doen't make sense. What's hapening is this . . . What's going right . . .
0
1281
by: gagonm | last post by:
Hi For past few days audit of my application is going.There SSL cookie issue is always used. On search Net I fount that when authentication mode is form we can use RequireSSL property . But...
0
7202
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
7086
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...
1
6991
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
7460
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
5578
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,...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.