473,748 Members | 10,771 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 3191
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
3188
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
3551
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
1391
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
1879
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
3346
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
2712
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
1847
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
7882
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
2206
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
8989
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8828
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
9367
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
9319
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
8241
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6795
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
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
4599
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...
1
3309
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

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.