Click to See Complete Forum and Search --> : global.asa error


cat
05-15-2003, 11:24 PM
I have this code in global.asa file :
Sub Application_OnStart

Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
VisitCountFile = Server.MapPath("visitcounter.txt")
Set Outinf = FileObject.OpenTextFile(VisitCountFile,1,FALSE,FALSE)

Application("visit")=Outinf.ReadLine
Application("VisitCountFile")=VisitCountFile

End Sub

I install VBscript 5.6 on server, but whenever I restart server, file global.asa stop working (If clients access this website, their web browsers suspend), and I must install vbscript 5.6 again, then global.asa works well.
I don't know why ? what happened with my server ?. Help me. Thank a lot.

cat
05-16-2003, 09:27 PM
To Dave Clark
Thank for your help, I follow your instructions, but ... nothing change. I still don't know how to correct it. I feel tired when I must install vbscript again after restart server.

cat
05-18-2003, 09:31 PM
Thank Dave Clark
yes, I am sure that the code works, I test variable application("visit") by the code below (in index.asp file)

numofvisitors=application("visit")
response.write(numofvisitors)

everytime I restart server, global.asa file stops working (as I described).
But when I install vbscript again, it works well, and I can display the number of visitors on my web.