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

unable to write the persistent cookies

Hi,

I tried the following method to add persistent cookies :-

HttpCookieCollection MyCookieCollection = new HttpCookieCollection();
HttpCookie MyCookie = new HttpCookie("LastVisit");
MyCookie.Value = DateTime.Now.ToString();
MyCookieCollection.Add(MyCookie);

I found out the above code seem not working if my setting on IE6.0 on
Tools->Internet Option->Privacy is setting to medium and I din check the
Advance ->override automatic cookies handling.
It works only while I check the option on override automatic cookies
handling, where I could see the physical cookies on the Temporary Internet
Files. Anyone know how to solve this problem?
Thanks in advance.

regards,
benny

Jul 21 '05 #1
2 1578
Hi Benny,

Pls set the expiration period for the cookies in order to make it persistent

MyCookie.Expires = Now() + 5
If you do not set the Expires attribute like the example below sets it, the
cookie will expire when the user closes their browser.

I hope it helps you

regards
Nishith

"benny" wrote:
Hi,

I tried the following method to add persistent cookies :-

HttpCookieCollection MyCookieCollection = new HttpCookieCollection();
HttpCookie MyCookie = new HttpCookie("LastVisit");
MyCookie.Value = DateTime.Now.ToString();
MyCookieCollection.Add(MyCookie);

I found out the above code seem not working if my setting on IE6.0 on
Tools->Internet Option->Privacy is setting to medium and I din check the
Advance ->override automatic cookies handling.
It works only while I check the option on override automatic cookies
handling, where I could see the physical cookies on the Temporary Internet
Files. Anyone know how to solve this problem?
Thanks in advance.

regards,
benny

Jul 21 '05 #2
hi,

I do try:-
MyCookie.Expires = Now() + 5
but it doesn't work if my setting on IE6.0 on
Tools->Internet Option->Privacy is setting to medium and I din check the
Advance ->override automatic cookies handling.
It works only while I check the option on override automatic cookies
handling, where I could see the physical cookies on the Temporary
Internet Files. how to solve this problem?
Thanks in advance.

regards,
benny ;)

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #3

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

Similar topics

0
by: benny | last post by:
Hi, I used following procedure to created the cookies:- FormsAuthentication.RedirectFromLoginPage(IntToStr(BizCustomerID), wchkRememberLogin.Checked); I found that the setting on web.config...
0
by: obhayes | last post by:
Hi All, Im using classic ASP (3.0) and I have a web farm with 2 webservers (webserver A and webserver B, both windows server 2003). I do not want to store any client specific information on the...
1
by: brad | last post by:
Hi, Im using classic ASP (3.0) and I have a web farm with 2 webservers (webserver A and webserver B, both windows server 2003). I do not want to store any client specific information on the...
4
by: Joey Powell | last post by:
Hello, I originally configured my application to use persistent cookies in error. Now, I need to find a way to disable those cookies. I have tried changing usernames and passwords for all of the...
1
by: hochun | last post by:
I am trying to read non-persistent cookies that is not reading in the program coding is there any software thich can read it (just like Cookie Monster, but it can't read non-persistent cookies ) ...
0
by: Kepler | last post by:
I'm testing very basic FormsAuthentication and having trouble with non-persistent cookies. Once authenticated with a non-persistent cookie, if I leave the browser alone for 30 minutes,...
2
by: benny | last post by:
Hi, I tried the following method to add persistent cookies :- HttpCookieCollection MyCookieCollection = new HttpCookieCollection(); HttpCookie MyCookie = new HttpCookie("LastVisit");...
3
by: sanchita | last post by:
Hello everyone, I didn't get any response in "Security" forum hence posting here again. I am having problem with persistent cookies. Even after setting "CreatePersistentCookie" to true in...
9
by: mel | last post by:
Hi all, I need a persistent TCP connection with my web server over page reloads. This means that, even if the user goes to a different page (in my domain), I want to keep a TCP connection...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
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
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,...
0
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...

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.