|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello,
can anybody help me? global.asa does not write anything in the logfile.txt. I had the same code working before in another project, so I am kind of at a loss here.... Two things: 1. global.asa is in the wwwroot directory. Is that correct? 2. The logfile.txt exists in the right directory. Any help is appreciated!!! START CODE: <script language="vbscript" runat="server"> Function Session_OnStart () Session("IPAddress")=Request.ServerVariables("REMOTE_ADDR") Session("User")=Request.ServerVariables("HTTP_Host") Session("Start")= Now () end Function Function Session_OnEnd () Set FileSys= CreateObject("Scripting.FileSystemObject") 'Set logfile= FileSys.GetFile ("c:\inetpub\wwwroot\LogFile.txt") Set AppendStream= FileSys.OpenTextFile ("c:\inetpub\wwwroot\LogFile.txt",8) AppendStream.WriteLine Session("IPAddress") & " Start of Session: " & Session("Start")& " Session End: " & Now() & " User: " &_ Session("User") & " SessionID: " & Session.SessionID AppendStream.Close End Function </script> END CODE |
|
#2
|
|||
|
|||
|
Take a look here
http://msdn.microsoft.com/library/e...lobalasaref.asp Perhaps you have not defined a web applicaton for your site? global.asa should be in the root folder for the web application, not necessarily \intepub\wwwroot |
|
#3
|
|||
|
|||
|
Hi,
thanks for the answer. I have a web application and all. At least, all the other webpages are in the same folder and they are running. Thanks again. |
|
#4
|
|||
|
|||
|
More info
I have discovered a line which is not working:
Set AppendStream= FileSys.OpenTextFile ("c:\inetpub\wwwroot\LogFile.txt",8) Apparently, the system cannot find, open or whatever, the file. The file exists, however, and in this folder, too. Do I need any specific rights for II to write to or modify a file?? Thanks for your help. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > global.asa not logging |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|