Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / October 2004

Tip: Looking for answers? Try searching our database.

unable to write the persistent cookies

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
benny - 26 Oct 2004 10:37 GMT
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
Nishith Pathak - 26 Oct 2004 12:55 GMT
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

> Hi,
>
[quoted text clipped - 15 lines]
> regards,
> benny
kuok benny - 27 Oct 2004 03:30 GMT
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 ;)

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.