session_onend trouble

Results 1 to 6 of 6

Thread: session_onend trouble

  1. #1
    Peppe bergqvist Guest

    Default session_onend trouble

    having trouble with a code in global.asa, the code works perfect in a regular .asp-file but it just won&#039t work in globala.asa<BR><BR>Anyone that can find something that doesn&#039t belong in the global.asa<BR><BR>Peppe<BR><BR>Sub Session_OnEnd <BR><BR> sMonth = DatePart( "m", now)<BR> If Len(sMonth) = 1 Then<BR> sMonth = "0" & sMonth<BR> End If<BR> sDay = DatePart( "d", now)<BR> If Len(sDay) = 1 Then<BR> sDay = "0" & sDay<BR> End If<BR> GetFormattedDate = DatePart( "yyyy", now ) & sMonth & sDay<BR><BR>Const ForReading = 1, ForAppending = 8<BR>Const TristateUseDefault = -1, TristateTrue = -1, TristateFalse = 0<BR><BR>slut = Left(time,5)<BR>start = left(session("start"),5)<BR><BR>Dim fs, f<BR>Set fs = CreateObject("Scripting.FileSystemObject")<BR>Set f = fs.OpenTextFile(server.MapPath(".files\" & GetFormattedDate & ".log"),ForAppending,True,TristateFalse)<BR> f.Writeline start&"/"&slut<BR> f.Close<BR>set f = nothing<BR>set fs = nothing<BR><BR>End Sub

  2. #2
    Join Date
    Dec 1969

    Default RE: session_onend trouble

    What delimiters is that code between ?

  3. #3
    Peppe bergqvist Guest

    Default RE: session_onend trouble

    delimeters?<BR>sorry, but I am not soo good at english.<BR>But the code resides in the global.asa in the part that handles session_onend.

  4. #4
    BalletChick Guest

    Default Don't mean to interrupt, but...

    I think he was asking... did you remember to include the &#060;% and the %&#062; around the script code?

  5. #5
    Peppe bergqvist Guest

    Default RE: Don't mean to interrupt, but...

    include the &#060;% %&#062; around the code in global.asa?<BR>No, I never do that. Instead I use the &#060;SCRIPT LANGUAGE="VBScript" RUNAT="Server"&#062; at the top..

  6. #6
    BalletChick Guest

    Default RE: Don't mean to interrupt, but...

    Actually, that&#039s what I meant... sorry for the confusion.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts