Cookies in global.asa
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > IIS server support > IIS ASP > Cookies in global.asa




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Cookies in global.asa  
ou812@ou812.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-26-04 03:18 PM

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.cookies("test") = "-1"
end sub
<-- Global.asa -->

<-- testcookie1.asp -->
<%Response.Redirect("testcookie2.asp")%>
<-- testcookie1.asp -->

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

I get "-1" on testcookie2.asp

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








[ Post a follow-up to this message ]



    Re: Cookies in global.asa  
Aaron [SQL Server MVP]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-26-04 03:18 PM

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.)




<ou812@ou812.com> wrote in message
news:40db3542.45151718@news.dallas.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.cookies("test") = "-1"
> end sub
> <-- Global.asa -->
>
> <-- testcookie1.asp -->
> <%Response.Redirect("testcookie2.asp")%>
> <-- testcookie1.asp -->
>
> <-- testcookie2.asp -->
> <%=request.cookies("test")%>
> <-- testcookie2.asp -->
>
> I get "-1" on testcookie2.asp
>
> Anyone else get the same result?
> Why am I getting the cookie in this test?
>
>
>







[ Post a follow-up to this message ]



    Re: Cookies in global.asa  
ou812@ou812.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-26-04 03:18 PM

On Thu, 24 Jun 2004 16:34:50 -0400, "Aaron [SQL Server MVP]"
<ten.xoc@dnartreb.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.)
>
>
>
>
><ou812@ou812.com> wrote in message
>news:40db3542.45151718@news.dallas.sbcglobal.net... 
>
>






[ Post a follow-up to this message ]



    Re: Cookies in global.asa  
Mark Schupp


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-26-04 03:18 PM

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


<ou812@ou812.com> wrote in message
news:40db3542.45151718@news.dallas.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.cookies("test") = "-1"
> end sub
> <-- Global.asa -->
>
> <-- testcookie1.asp -->
> <%Response.Redirect("testcookie2.asp")%>
> <-- testcookie1.asp -->
>
> <-- testcookie2.asp -->
> <%=request.cookies("test")%>
> <-- testcookie2.asp -->
>
> I get "-1" on testcookie2.asp
>
> Anyone else get the same result?
> Why am I getting the cookie in this test?
>
>
>







[ Post a follow-up to this message ]



    Re: Cookies in global.asa  
Zenobia


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-26-04 05:44 PM

On Thu, 24 Jun 2004 20:48:51 GMT, ou812@ou812.com wrote:

>On Thu, 24 Jun 2004 16:34:50 -0400, "Aaron [SQL Server MVP]"
><ten.xoc@dnartreb.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.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:45 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register