Hi,
I have this code in the global.asa file:
Sub Session_OnEnd()
Set oFso= CreateObject("Scripting.FileSystemObject")
Set oFileTxt= oFso.OpenTextFile("c:\debugS.txt", 8, true)
oFileTxt.WriteLine Now()&" SESSION END "&session.sessionId
Set oFso= nothing: Set oFileTxt= nothing
End Sub
Sub Session_OnStart()
Set oFso= CreateObject("Scripting.FileSystemObject")
Set oFileTxt= oFso.OpenTextFile("c:\debugS.txt", 8, true)
oFileTxt.WriteLine Now()&" SESSION START "&session.sessionId
Set oFso= Nothing: Set oFileTxt= Nothing
End Sub
when i start un new session, i have new entries in the file c:\debugS.txt
but nothing on session End.
I know that i must wait the session's end (and not user leaves).
When i force session End with session.abandon() function, i have a new
session added in the debugS.txt file but no session end entry ?!?
what happen ?
somebody can help me ?
thanx a lot 6 1876
I would recommend never using session_onend. It is unreliable at best, as
you are discovering.
Jeff
"Olivier SOW" <os**@espace-competences.org> wrote in message
news:OH**************@TK2MSFTNGP09.phx.gbl... Hi,
I have this code in the global.asa file:
Sub Session_OnEnd() Set oFso= CreateObject("Scripting.FileSystemObject") Set oFileTxt= oFso.OpenTextFile("c:\debugS.txt", 8, true) oFileTxt.WriteLine Now()&" SESSION END "&session.sessionId Set oFso= nothing: Set oFileTxt= nothing End Sub
Sub Session_OnStart() Set oFso= CreateObject("Scripting.FileSystemObject") Set oFileTxt= oFso.OpenTextFile("c:\debugS.txt", 8, true) oFileTxt.WriteLine Now()&" SESSION START "&session.sessionId Set oFso= Nothing: Set oFileTxt= Nothing End Sub
when i start un new session, i have new entries in the file c:\debugS.txt but nothing on session End. I know that i must wait the session's end (and not user leaves). When i force session End with session.abandon() function, i have a new session added in the debugS.txt file but no session end entry ?!?
what happen ? somebody can help me ?
thanx a lot
I suspect a permissions issue. In Session_onend, it's the IWAM account that
the code runs as, not the IUSR
Olivier SOW wrote: Hi,
I have this code in the global.asa file:
Sub Session_OnEnd() Set oFso= CreateObject("Scripting.FileSystemObject") Set oFileTxt= oFso.OpenTextFile("c:\debugS.txt", 8, true) oFileTxt.WriteLine Now()&" SESSION END "&session.sessionId Set oFso= nothing: Set oFileTxt= nothing End Sub
Sub Session_OnStart() Set oFso= CreateObject("Scripting.FileSystemObject") Set oFileTxt= oFso.OpenTextFile("c:\debugS.txt", 8, true) oFileTxt.WriteLine Now()&" SESSION START "&session.sessionId Set oFso= Nothing: Set oFileTxt= Nothing End Sub
when i start un new session, i have new entries in the file c:\debugS.txt but nothing on session End. I know that i must wait the session's end (and not user leaves). When i force session End with session.abandon() function, i have a new session added in the debugS.txt file but no session end entry ?!?
what happen ? somebody can help me ?
thanx a lot
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
I know that.
By default IWAM user don't have write access to c:\ ???
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> a écrit dans le message de
news:%2****************@TK2MSFTNGP09.phx.gbl...
| I suspect a permissions issue. In Session_onend, it's the IWAM account
that
| the code runs as, not the IUSR
| Olivier SOW wrote:
| > Hi,
| >
| > I have this code in the global.asa file:
| >
| >
| > Sub Session_OnEnd()
| > Set oFso= CreateObject("Scripting.FileSystemObject")
| > Set oFileTxt= oFso.OpenTextFile("c:\debugS.txt", 8, true)
| > oFileTxt.WriteLine Now()&" SESSION END "&session.sessionId
| > Set oFso= nothing: Set oFileTxt= nothing
| > End Sub
| >
| > Sub Session_OnStart()
| > Set oFso= CreateObject("Scripting.FileSystemObject")
| > Set oFileTxt= oFso.OpenTextFile("c:\debugS.txt", 8, true)
| > oFileTxt.WriteLine Now()&" SESSION START "&session.sessionId
| > Set oFso= Nothing: Set oFileTxt= Nothing
| > End Sub
| >
| >
| > when i start un new session, i have new entries in the file
| > c:\debugS.txt but nothing on session End.
| > I know that i must wait the session's end (and not user leaves).
| > When i force session End with session.abandon() function, i have a new
| > session added in the debugS.txt file but no session end entry ?!?
| >
| > what happen ?
| > somebody can help me ?
| >
| > thanx a lot
|
| --
| Microsoft MVP -- ASP/ASP.NET
| Please reply to the newsgroup. The email account listed in my From
| header is my spam trap, so I don't check it very often. You will get a
| quicker response by posting to the newsgroup.
|
|
Not on my machine. Take a look at the file system settings on yours.
Bob Barrows
PS. You should not be granting that user account permissions for you whole c
drive: that's a huge security hole. Permissions shold be granted on an
as-needed basis.
SOW Olivier wrote: I know that. By default IWAM user don't have write access to c:\ ???
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> a écrit dans le message de news:%2****************@TK2MSFTNGP09.phx.gbl... I suspect a permissions issue. In Session_onend, it's the IWAM account that the code runs as, not the IUSR Olivier SOW wrote: Hi,
I have this code in the global.asa file:
Sub Session_OnEnd() Set oFso= CreateObject("Scripting.FileSystemObject") Set oFileTxt= oFso.OpenTextFile("c:\debugS.txt", 8, true) oFileTxt.WriteLine Now()&" SESSION END "&session.sessionId Set oFso= nothing: Set oFileTxt= nothing End Sub
Sub Session_OnStart() Set oFso= CreateObject("Scripting.FileSystemObject") Set oFileTxt= oFso.OpenTextFile("c:\debugS.txt", 8, true) oFileTxt.WriteLine Now()&" SESSION START "&session.sessionId Set oFso= Nothing: Set oFileTxt= Nothing End Sub
when i start un new session, i have new entries in the file c:\debugS.txt but nothing on session End. I know that i must wait the session's end (and not user leaves). When i force session End with session.abandon() function, i have a new session added in the debugS.txt file but no session end entry ?!?
what happen ? somebody can help me ?
thanx a lot
-- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
I think you are assuming the session on_end fires at all.
Try something besides writing to a text file to convince yourself this code
is being hit at all..
Jeff
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:O$**************@TK2MSFTNGP15.phx.gbl... Not on my machine. Take a look at the file system settings on yours.
Bob Barrows
PS. You should not be granting that user account permissions for you whole
c drive: that's a huge security hole. Permissions shold be granted on an as-needed basis.
SOW Olivier wrote: I know that. By default IWAM user don't have write access to c:\ ???
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> a écrit dans le message de news:%2****************@TK2MSFTNGP09.phx.gbl... I suspect a permissions issue. In Session_onend, it's the IWAM account that the code runs as, not the IUSR Olivier SOW wrote: Hi,
I have this code in the global.asa file:
Sub Session_OnEnd() Set oFso= CreateObject("Scripting.FileSystemObject") Set oFileTxt= oFso.OpenTextFile("c:\debugS.txt", 8, true) oFileTxt.WriteLine Now()&" SESSION END "&session.sessionId Set oFso= nothing: Set oFileTxt= nothing End Sub
Sub Session_OnStart() Set oFso= CreateObject("Scripting.FileSystemObject") Set oFileTxt= oFso.OpenTextFile("c:\debugS.txt", 8, true) oFileTxt.WriteLine Now()&" SESSION START "&session.sessionId Set oFso= Nothing: Set oFileTxt= Nothing End Sub
when i start un new session, i have new entries in the file c:\debugS.txt but nothing on session End. I know that i must wait the session's end (and not user leaves). When i force session End with session.abandon() function, i have a new session added in the debugS.txt file but no session end entry ?!?
what happen ? somebody can help me ?
thanx a lot
-- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup.
-- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM"
No - it fires. When there's a filesystem access problem, I do get an error
message ... oh! You weren't talking to me :-)
Bob
Jeff Dillon wrote: I think you are assuming the session on_end fires at all.
Try something besides writing to a text file to convince yourself this code is being hit at all..
Jeff "Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message news:O$**************@TK2MSFTNGP15.phx.gbl... Not on my machine. Take a look at the file system settings on yours.
Bob Barrows
PS. You should not be granting that user account permissions for you whole c drive: that's a huge security hole. Permissions shold be granted on an as-needed basis.
SOW Olivier wrote: I know that. By default IWAM user don't have write access to c:\ ???
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> a écrit dans le message de news:%2****************@TK2MSFTNGP09.phx.gbl... I suspect a permissions issue. In Session_onend, it's the IWAM account that the code runs as, not the IUSR Olivier SOW wrote: > Hi, > > I have this code in the global.asa file: > > > Sub Session_OnEnd() > Set oFso= CreateObject("Scripting.FileSystemObject") > Set oFileTxt= oFso.OpenTextFile("c:\debugS.txt", 8, true) > oFileTxt.WriteLine Now()&" SESSION END "&session.sessionId > Set oFso= nothing: Set oFileTxt= nothing > End Sub > > Sub Session_OnStart() > Set oFso= CreateObject("Scripting.FileSystemObject") > Set oFileTxt= oFso.OpenTextFile("c:\debugS.txt", 8, true) > oFileTxt.WriteLine Now()&" SESSION START "&session.sessionId > Set oFso= Nothing: Set oFileTxt= Nothing > End Sub > > > when i start un new session, i have new entries in the file > c:\debugS.txt but nothing on session End. > I know that i must wait the session's end (and not user leaves). > When i force session End with session.abandon() function, i have a > new session added in the debugS.txt file but no session end entry > ?!? > > what happen ? > somebody can help me ? > > thanx a lot
-- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup.
-- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM"
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: MostlyH2O |
last post by:
Hi Folks,
I'm having a hard time getting my Session_OnEnd event to fire in my
global.asa.
Here's what I have:
<SCRIPT LANGUAGE=VBSCRIPT RUNAT=Server>
SUB Session_OnStart
Session.TimeOut =...
|
by: Soha El-Saeed |
last post by:
Dear All;
I wrote this code in the global.asa but it dosen't work inspite that
it works in any asp file and also in the global.asa file but only in
the session_onstart part.This code is to delete...
|
by: cab |
last post by:
i have the following code in the "Sub Session_OnEnd" routine that does not
seem to run.....
Sub Session_OnEnd
strConnect = "Driver={SQL Server};Server=SERVER;Database=database; User...
|
by: Nancy Drew |
last post by:
hi all
i'm trying to keep users from being able to login to a site twice at the
same time. everytime a user does a login, i stick their userID into an
application scoped array. if they try to...
|
by: Phil Lamey |
last post by:
Hi All,
I have the following code but for some reason I cannot get the Session_OnEnd
event to fire.
I am trying to limit the amount of connections a browser session can have.
Where the...
|
by: Propin |
last post by:
Have a problem with below code in global.asa. Same problem as described in
this news group before, IWAM_machinename did not solve my problem.
Have created the following test code (file is never...
|
by: steve |
last post by:
This event does not fire when session is stored in SQL or
in the SessionState service, this is documented. If you
think about, it has to be this way, because these
implementations are able to...
|
by: David Thielen |
last post by:
Hi;
Is there some kind of session ID variable that I can get in the code behind
and that is available in Session_OnEnd() to know what session ended?
--
thanks - dave...
|
by: Bob Milutinovic |
last post by:
Greetings, folks.
Through the years there's always been trepidation about relying on the
Session_OnEnd routine being fired at the conclusion of a user session, hence
my instinctive avoidance of...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
|
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,...
|
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...
| |