473,386 Members | 1,842 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,386 software developers and data experts.

Not able to simulate blocking cookies for ASP.Net app

I need to test my ASP.net web application for the case that the client
browser doesn't support cookies or for the case that cookies are
turned off on the client browswer.
What is odd is that when I go to the IE (6.0) Tools | Internet
Options | Privacy Tab and select "Block All Cookies" level the
following still returns true in my Page_Load
Request.Browser.Cookies
This plus the fact that the client side javascript and my ASP.Net
application both read and write cookies baffles me. What am I not
doing correctly to disable cookies in my client browser to simulate
the no cookies condition?

Thanks for your help in advance,
--Greg
Nov 17 '05 #1
4 1884
Hi Greg,

Based on my research and experience, I would like to share the following
information with you.

Firstly, the privacy settings only affect Web sites in the Internet zone.
If we are testing against the web sites that are located in local intranet
zone, for example, the localhost, the privacy setting will not affect in
such case. To disallow cookies in local intranet zone, we should set the
security level in this zone to high (The default security level for the
Local intranet zone is Medium, therefore, Internet Explorer will allow all
cookies from Web sites in this zone to be saved on our computer and read by
the Web site that created them.)

Secondly, when we change your privacy settings, the changes might not
affect cookies that are already on our computer. If we want to ensure that
all of the cookies on our computer meet our privacy settings, we should
delete all of the existing cookies on our computer. When we return to Web
sites that previously had saved cookies on our computer, the Web sites that
meet our privacy settings will save cookies on our computer again. The Web
sites that do not meet our privacy settings will not be allowed to save
cookies on our computer, and might not function properly.

Does it answer your question? If I have misunderstood your concern, please
feel free to let me know.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 17 '05 #2
Hi Greg,

Based on my research and experience, I would like to share the following
information with you.

Firstly, the privacy settings only affect Web sites in the Internet zone.
If we are testing against the web sites that are located in local intranet
zone, for example, the localhost, the privacy setting will not affect in
such case. To disallow cookies in local intranet zone, we should set the
security level in this zone to high (The default security level for the
Local intranet zone is Medium, therefore, Internet Explorer will allow all
cookies from Web sites in this zone to be saved on our computer and read by
the Web site that created them.)

Secondly, when we change your privacy settings, the changes might not
affect cookies that are already on our computer. If we want to ensure that
all of the cookies on our computer meet our privacy settings, we should
delete all of the existing cookies on our computer. When we return to Web
sites that previously had saved cookies on our computer, the Web sites that
meet our privacy settings will save cookies on our computer again. The Web
sites that do not meet our privacy settings will not be allowed to save
cookies on our computer, and might not function properly.

Does it answer your question? If I have misunderstood your concern, please
feel free to let me know.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 17 '05 #3
"Greg Livengood" <gr**@livengood.com> wrote in message
news:9c**************************@posting.google.c om...
I need to test my ASP.net web application for the case that the client
browser doesn't support cookies or for the case that cookies are
turned off on the client browswer.
What is odd is that when I go to the IE (6.0) Tools | Internet
Options | Privacy Tab and select "Block All Cookies" level the
following still returns true in my Page_Load
Request.Browser.Cookies
This plus the fact that the client side javascript and my ASP.Net
application both read and write cookies baffles me. What am I not
doing correctly to disable cookies in my client browser to simulate
the no cookies condition?


Request.Browser.Cookies only tells you whether the browser supports cookies.
For example, it tells you that Internet Explorer supports cookies.

It does not say whether a particular cookie, if sent to the client, would be
returned to your server code. If you want to know that, you'll have to send
a cookie to the client, then redirect to a page which will determine whether
the cookie you sent to the client has been received by the server. I usually
put something unique into the cookie so I can be sure I got the cookie I
sent today, not a cookie I sent last week.

--
John
Nov 17 '05 #4
"Greg Livengood" <gr**@livengood.com> wrote in message
news:9c**************************@posting.google.c om...
I need to test my ASP.net web application for the case that the client
browser doesn't support cookies or for the case that cookies are
turned off on the client browswer.
What is odd is that when I go to the IE (6.0) Tools | Internet
Options | Privacy Tab and select "Block All Cookies" level the
following still returns true in my Page_Load
Request.Browser.Cookies
This plus the fact that the client side javascript and my ASP.Net
application both read and write cookies baffles me. What am I not
doing correctly to disable cookies in my client browser to simulate
the no cookies condition?


Request.Browser.Cookies only tells you whether the browser supports cookies.
For example, it tells you that Internet Explorer supports cookies.

It does not say whether a particular cookie, if sent to the client, would be
returned to your server code. If you want to know that, you'll have to send
a cookie to the client, then redirect to a page which will determine whether
the cookie you sent to the client has been received by the server. I usually
put something unique into the cookie so I can be sure I got the cookie I
sent today, not a cookie I sent last week.

--
John
Nov 17 '05 #5

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

Similar topics

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
1
by: Hal | last post by:
I am experiencing blocking problems on SQL Server 2000, SP3a. I have read the posts and set up a job SQL agent to report on these occurences I save the results to a table before executing an sp to...
61
by: /* frank */ | last post by:
I have to do a homework: make a CPU simulator using C language. I have a set of asm instructions so I have to write a program that should: - load .asm file - view .asm file - do a step by step...
7
by: Michi Henning | last post by:
Hi, I'm using a non-blocking connect to connect to a server. Works fine -- the server gets and accepts the connection. However, once the connection is established, I cannot retrieve either the...
0
by: Greg Livengood | last post by:
I need to test my ASP.net web application for the case that the client browser doesn't support cookies or for the case that cookies are turned off on the client browswer. What is odd is that when...
2
by: fltcpt | last post by:
After reading the many posts on the newsgroup, I still disagree with the people who claim you will never need a sleep(), or that a sleep() is a bad idea, or that sleep() does not fit in the event...
3
by: WayneH | last post by:
Hi - I'm trying to use javascript to determine if a user's browser has cookies enabled or not. To test: copy this code into a file with a 'html' extension, and load it into your IE browser...
12
by: puzzlecracker | last post by:
is it even possible or/and there is a better alternative to accept input in a nonblocking manner?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.