473,699 Members | 2,628 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cookies in global.asa

Set IE 6.0 ver. X to "Block all Cookies" in privacy settings and try
this code in three separate files.

<-- Global.asa -->
sub Session_OnStart
response.cookie s("test") = "-1"
end sub
<-- Global.asa -->

<-- testcookie1.asp -->
<%Response.Redi rect("testcooki e2.asp")%>
<-- testcookie1.asp -->

<-- testcookie2.asp -->
<%=request.cook ies("test")%>
<-- testcookie2.asp -->

I get "-1" on testcookie2.asp

Anyone else get the same result?
Why am I getting the cookie in this test?

Jul 19 '05 #1
4 3187
Is global.asa on your own machine? Are you sure you set the block in that
zone?

--
http://www.aspfaq.com/
(Reverse address to reply.)


<ou***@ou812.co m> wrote in message
news:40******** *******@news.da llas.sbcglobal. net...
Set IE 6.0 ver. X to "Block all Cookies" in privacy settings and try
this code in three separate files.

<-- Global.asa -->
sub Session_OnStart
response.cookie s("test") = "-1"
end sub
<-- Global.asa -->

<-- testcookie1.asp -->
<%Response.Redi rect("testcooki e2.asp")%>
<-- testcookie1.asp -->

<-- testcookie2.asp -->
<%=request.cook ies("test")%>
<-- testcookie2.asp -->

I get "-1" on testcookie2.asp

Anyone else get the same result?
Why am I getting the cookie in this test?

Jul 19 '05 #2
On Thu, 24 Jun 2004 16:34:50 -0400, "Aaron [SQL Server MVP]"
<te*****@dnartr eb.noraa> wrote:

Nope. The script runs on a commercial host in Canada, not on my
intranet. All I wanted to do was "test" for cookies and I found that
this would just "take" the cookie regardless of the browser settings.
I guess it's taking the cookie because it IS displaying a string
value, although the privacy report (via the icon at the bottom of the
page) states it "blocked" cookies on pages.

Is global.asa on your own machine? Are you sure you set the block in that
zone?

--
http://www.aspfaq.com/
(Reverse address to reply.)


<ou***@ou812.c om> wrote in message
news:40******* ********@news.d allas.sbcglobal .net...
Set IE 6.0 ver. X to "Block all Cookies" in privacy settings and try
this code in three separate files.

<-- Global.asa -->
sub Session_OnStart
response.cookie s("test") = "-1"
end sub
<-- Global.asa -->

<-- testcookie1.asp -->
<%Response.Redi rect("testcooki e2.asp")%>
<-- testcookie1.asp -->

<-- testcookie2.asp -->
<%=request.cook ies("test")%>
<-- testcookie2.asp -->

I get "-1" on testcookie2.asp

Anyone else get the same result?
Why am I getting the cookie in this test?



Jul 19 '05 #3
I am not familiar enough with cookies to be sure but you are setting the
cookie with every request.

If all cookies are blocked then session_onstart will fire for every request
(each request will be a new session).

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
<ou***@ou812.co m> wrote in message
news:40******** *******@news.da llas.sbcglobal. net...
Set IE 6.0 ver. X to "Block all Cookies" in privacy settings and try
this code in three separate files.

<-- Global.asa -->
sub Session_OnStart
response.cookie s("test") = "-1"
end sub
<-- Global.asa -->

<-- testcookie1.asp -->
<%Response.Redi rect("testcooki e2.asp")%>
<-- testcookie1.asp -->

<-- testcookie2.asp -->
<%=request.cook ies("test")%>
<-- testcookie2.asp -->

I get "-1" on testcookie2.asp

Anyone else get the same result?
Why am I getting the cookie in this test?

Jul 19 '05 #4
On Thu, 24 Jun 2004 20:48:51 GMT, ou***@ou812.com wrote:
On Thu, 24 Jun 2004 16:34:50 -0400, "Aaron [SQL Server MVP]"
<te*****@dnart reb.noraa> wrote:

Nope. The script runs on a commercial host in Canada, not on my
intranet. All I wanted to do was "test" for cookies and I found that
this would just "take" the cookie regardless of the browser settings.

I guess it's taking the cookie because it IS displaying a string
value, although the privacy report (via the icon at the bottom of the
page) states it "blocked" cookies on pages.


Maybe the browser just blocks permanent cookies which are stored
on disk after the session's over? ASP session cookies are only
temporary and are destroyed when the session ends. To set a
permanent cookie with ASP give the cookie an expiry date.
Compare how it behaves with both types: permanent and sessional.

A browser that blocked all cookies wouldn't work with ASP.

Jul 19 '05 #5

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

Similar topics

5
3186
by: TG | last post by:
This is more of a pain than I thought it would be. I need a simple code segment to determine whether a browser accepts cookies or not. When I pass variables between pages when cookies are turned off, the global variables are empty between pages, fine, that tells me cookies store the global variables - right? I store the values in $_session and when cookies are turned on values are passed between web pages - I can see these values in fields...
20
3544
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
0
1389
by: yukon | last post by:
Hi there the next is my platform IIS5 windows 2000 asp vbscript My working area has the next virtual directoy: testAc (corrective ambient) testAe (evolutionary ambient)
2
1877
by: Keon | last post by:
Hoi Is it possible to use cookies between different domains? For my site I use 2 domains; the first for my global site with ASP en HTML the second is for my forum located on "hyperboards" a free forum domain On de second domain i don't have any control and i can't put any new webpages on that site.
2
3343
by: Amit D.Shinde | last post by:
Hello Experts.. I need some help regarding cookies and session objects and also global.asa file I am creating one cookie when a user logs in on my website. The cookie stores the login name of the user. I want that cookie should get deleted when user closes the browser without signing out. I think it is done in global.asa file . But i don;t know how to do it?
0
2709
by: bb | last post by:
Hello In my Session_OnStart in Global.asa, I am setting some cookies. One of them, I set as follows: dim UserID UserID = Request.ServerVariables("LOGON_USER") Response.Cookies("User")("ID") = UCASE(UserID) When I immediately log the cookie value retrieved from
3
1843
by: Magnus | last post by:
I have a iframe inside a main html file. The iframe is used to display various html files. Inside the html files displayed in the iframe I want to have javascript to set certain global cookies, which I can later access in the main html file. Is this possible? It seems like when the cookies are set inside the iframe, the cookies are not accessible in the main html file. I have also tried using: document.cookie = "path=/;var=val" Also...
3
7871
by: Peter Row | last post by:
Hi, I better get the background stuff out the way first, so here goes: - Porting a VB6 webclass app to VB.NET using HttpHandlers and FormsAuthentication - When someone visits my site unbeknown to them they are automatically logged in as a guest via the .NET forms authentication.
0
2198
by: Mach Runner | last post by:
I am implementing a secure website using the ASP.NET FormsAuthentication model. I have taken the simplest code examples from MSDN (login.aspx,default.aspx, web.config) but cannot get proper behavior on my machine. As an unauthenticated user, I navigate to the website http://localhost/XXX. global.Authenticate_Request considers sending default.apsx but cannot find any authentication cookie in the Context object, so the request is...
0
8613
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9032
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8908
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8880
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4374
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3054
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 we have to send another system
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.