Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Can't get "Block all cookies" to work

Reply
Thread Tools

Can't get "Block all cookies" to work

 
 
Framework fan
Guest
Posts: n/a
 
      11-05-2003
Hello.

I am having difficulty testing when the user selects "Block all
cookies" inside IE.

My trouble is that my test cookie never gets blocked.

I set IE's privacy level to "Block all cookies"

I set IE's Local Intranet security setting to High.

My simple code is as follows:

'Webform1 -- write a cookie
Dim ckeMyCookie As New HttpCookie("293692",
DateTime.Now.ToLongTimeString)
ckeMyCookie.Expires = DateTime.Now.AddDays(1)
Response.Cookies.Add(ckeMyCookie)
Response.Redirect("Webform2.aspx")

'Webform2 -- read the cookie
If Not Request.Cookies.Item("293692") Is Nothing Then
Dim ckeMyCookie As HttpCookie =
Request.Cookies.Item("293692")
If Not ckeMyCookie.Value = Nothing Then
Label2.Text = ckeMyCookie.Value
End If
End If

When I run the web app locally from the browser, the cookie *always*
works.

I am expecting that the cookie's value should *not* be read.
Unfortunately, the cookie's value is always read, and the current time
is always displayed.

(I've tried rebooting, and using different cookie names.)

Please can someone tell me where I've gone wrong.

Thank you very much in advance.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
![Oof Topix] All McCain, All Flip-Flop, All the Time Bucky Breeder Computer Support 7 09-27-2008 03:33 PM
Hi I am new to asp i can not get it to work on xp pro sp2 even though the localhost work but asp pages dont so can some one help craig dicker ASP .Net 9 07-07-2005 11:52 AM
get all value of all row of a dynamic html table SAN CAZIANO Javascript 1 12-14-2004 05:29 PM
Cannot get Mozilla to work at all Camilla Cracchiolo Firefox 5 05-06-2004 11:40 AM



Advertisments