Hi,
I have this code in the global.asa file:
Sub Session_OnEnd()
Set oFso= CreateObject("S cripting.FileSy stemObject")
Set oFileTxt= oFso.OpenTextFi le("c:\debugS.t xt", 8, true)
oFileTxt.WriteL ine Now()&" SESSION END "&session.sessi onId
Set oFso= nothing: Set oFileTxt= nothing
End Sub
Sub Session_OnStart ()
Set oFso= CreateObject("S cripting.FileSy stemObject")
Set oFileTxt= oFso.OpenTextFi le("c:\debugS.t xt", 8, true)
oFileTxt.WriteL ine Now()&" SESSION START "&session.sessi onId
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 1895
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******** ******@TK2MSFTN GP09.phx.gbl... Hi,
I have this code in the global.asa file:
Sub Session_OnEnd() Set oFso= CreateObject("S cripting.FileSy stemObject") Set oFileTxt= oFso.OpenTextFi le("c:\debugS.t xt", 8, true) oFileTxt.WriteL ine Now()&" SESSION END "&session.sessi onId Set oFso= nothing: Set oFileTxt= nothing End Sub
Sub Session_OnStart () Set oFso= CreateObject("S cripting.FileSy stemObject") Set oFileTxt= oFso.OpenTextFi le("c:\debugS.t xt", 8, true) oFileTxt.WriteL ine Now()&" SESSION START "&session.sessi onId 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("S cripting.FileSy stemObject") Set oFileTxt= oFso.OpenTextFi le("c:\debugS.t xt", 8, true) oFileTxt.WriteL ine Now()&" SESSION END "&session.sessi onId Set oFso= nothing: Set oFileTxt= nothing End Sub
Sub Session_OnStart () Set oFso= CreateObject("S cripting.FileSy stemObject") Set oFileTxt= oFso.OpenTextFi le("c:\debugS.t xt", 8, true) oFileTxt.WriteL ine Now()&" SESSION START "&session.sessi onId 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******@NOyah oo.SPAMcom> a écrit dans le message de
news:%2******** ********@TK2MSF TNGP09.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("S cripting.FileSy stemObject")
| > Set oFileTxt= oFso.OpenTextFi le("c:\debugS.t xt", 8, true)
| > oFileTxt.WriteL ine Now()&" SESSION END "&session.sessi onId
| > Set oFso= nothing: Set oFileTxt= nothing
| > End Sub
| >
| > Sub Session_OnStart ()
| > Set oFso= CreateObject("S cripting.FileSy stemObject")
| > Set oFileTxt= oFso.OpenTextFi le("c:\debugS.t xt", 8, true)
| > oFileTxt.WriteL ine Now()&" SESSION START "&session.sessi onId
| > 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******@NOyah oo.SPAMcom> a écrit dans le message de news:%2******** ********@TK2MSF TNGP09.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("S cripting.FileSy stemObject") Set oFileTxt= oFso.OpenTextFi le("c:\debugS.t xt", 8, true) oFileTxt.WriteL ine Now()&" SESSION END "&session.sessi onId Set oFso= nothing: Set oFileTxt= nothing End Sub
Sub Session_OnStart () Set oFso= CreateObject("S cripting.FileSy stemObject") Set oFileTxt= oFso.OpenTextFi le("c:\debugS.t xt", 8, true) oFileTxt.WriteL ine Now()&" SESSION START "&session.sessi onId 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******@NOyah oo.SPAMcom> wrote in message
news:O$******** ******@TK2MSFTN GP15.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******@NOyah oo.SPAMcom> a écrit dans le message de news:%2******** ********@TK2MSF TNGP09.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("S cripting.FileSy stemObject") Set oFileTxt= oFso.OpenTextFi le("c:\debugS.t xt", 8, true) oFileTxt.WriteL ine Now()&" SESSION END "&session.sessi onId Set oFso= nothing: Set oFileTxt= nothing End Sub
Sub Session_OnStart () Set oFso= CreateObject("S cripting.FileSy stemObject") Set oFileTxt= oFso.OpenTextFi le("c:\debugS.t xt", 8, true) oFileTxt.WriteL ine Now()&" SESSION START "&session.sessi onId 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******@NOyah oo.SPAMcom> wrote in message news:O$******** ******@TK2MSFTN GP15.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******@NOyah oo.SPAMcom> a écrit dans le message de news:%2******** ********@TK2MSF TNGP09.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("S cripting.FileSy stemObject") > Set oFileTxt= oFso.OpenTextFi le("c:\debugS.t xt", 8, true) > oFileTxt.WriteL ine Now()&" SESSION END "&session.sessi onId > Set oFso= nothing: Set oFileTxt= nothing > End Sub > > Sub Session_OnStart () > Set oFso= CreateObject("S cripting.FileSy stemObject") > Set oFileTxt= oFso.OpenTextFi le("c:\debugS.t xt", 8, true) > oFileTxt.WriteL ine Now()&" SESSION START "&session.sessi onId > 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 = 30
END SUB
|
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 a txt file at the end
of the session.The file was created during the user's session and has
the name of the session id. The session variable "session("mpath")" is
the varible which will hold the path of the created file. This is my
first question...
|
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
ID=xxxxxx;Pwd=xxxxxxx"
Set objConnEnd = Server.CreateObject("ADODB.Connection")
objConnEnd.Open strConnect
|
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 login again, i bounce them to an
error page. i use the session_onEnd sub within global.asa to remove their
userID from the array at the end of their session, and this seems to work
fine. however, if i just shut down the browser, the sub_onEnd...
|
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 application is a virtual directory.
Any ideas?
------------
| |
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 deleted on my IIS6
Win2003
environment, any idea?):
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Sub Application_OnStart
End Sub
|
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 serve web farms or gardens (1
application instance per cpu on multi-cpu machines). If
the end-of-session was fired, in which application
instance on which machine would the event fire? Of course
the framework could provide some other means of...
|
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
david_at_windward_dot_net
http://www.windwardreports.com
|
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 using it in anything I've created.
Now comes a time when it'd actually be desirable to use this feature; can
anyone tell me if its reliability is any better with IIS6 (under Server
2003) than it was with previous IIS incarnations?
|
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...
|
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,...
| |
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...
|
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...
|
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...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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...
| |