问题描述
你好那里:
我的Golbal.asa文件没有解雇或工作,我把它放在root目录里我所有的asp文件,我的网络设置被设置为应用程序,我浏览了互联网对于类似的问题,我仍然无法让它工作。我尝试使用response.WriteApplication(" start")在asp文件中显示应用程序变量,并且浏览器上没有显示任何内容。
我在Windows 2000上运行IIS
任何帮助深表感谢。这是我的golbal.asa文件:
< SCRIPT LANGUAGE =" VBScript" RUNAT =" Server">''我这样做是因为你不能在Session_OnEnd中使用Server.MapPath
''你将不得不修改这个
''反映服务器上的相应路径。
Const strLogFilePath =" C:\ MyFolderName \\\ssion \\ .log"
Sub Application_OnStart
应用程序(开始)=现在()
结束子
Sub Session_OnStart
Session.Timeout = 5
Session(" Start")= Now()
Dim objFSO,objFile
设置objFSO = Server.CreateObject(" Scripting。 FileSystemObject")
设置objFile = objFSO.OpenTextFile(strLogFilePath,8,True)
设置objFSO = Nothing
objFile.WriteLine" Session : &安培; Session.SessionID& "从 &安培;现在()
objFile.Close
设置objFile = Nothing
End Sub
Sub Session_OnEnd
Dim objFSO,objFile
设置objFSO = Server.CreateObject(" Scripting.FileSystemObject")
设置objFile = objFSO.OpenTextFile(strLogFilePath,8,True )
设置objFSO = Nothing
objFile.WriteLine" Session:" &安培; Session.SessionID& "结束于&现在()
objFile.Close
设置objFile = Nothing
End Sub
Sub Application_OnEnd
End Sub
< / SCRIPT>
Hello there:
My Golbal.asa file isn''t firing or working, I put it in the rootdirectory whereall my asp files, my web diectory is set asapplication, I looked throught the internet for similar problembut I am still unable to get it to work. I tried to showapplication variable in asp file by using response.WriteApplication("start") and nothing is showing on the browser.
I am running IIS on windows 2000
Any help is much appreciated. Here is my golbal.asa file:
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">'' I do this becauseyou can''t use Server.MapPath
'' in Session_OnEnd... you''ll have to modify this
'' to reflect the appropriate path on your server.
Const strLogFilePath = "C:\MyFolderName\session.log"
Sub Application_OnStart
Application("Start") = Now()
End Sub
Sub Session_OnStart
Session.Timeout = 5
Session("Start") = Now()
Dim objFSO, objFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strLogFilePath, 8, True)
Set objFSO = Nothing
objFile.WriteLine "Session: " & Session.SessionID & " started at" & Now ()
objFile.Close
Set objFile = Nothing
End Sub
Sub Session_OnEnd
Dim objFSO, objFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strLogFilePath, 8, True)
Set objFSO = Nothing
objFile.WriteLine "Session: " & Session.SessionID & " ended at "& Now ()
objFile.Close
Set objFile = Nothing
End Sub
Sub Application_OnEnd
End Sub
</SCRIPT>
推荐答案
你试试:
<%application.abandon%>
< http://BGonly.microsoft.com/?search = plug_pull_out%20ASP>
-
Evertjan。
荷兰。
(请将x''es更改为我的电子邮件地址中的点数。
Did you try:
<% application.abandon %>
<http://BGonly.microsoft.com/?search=plug_pull_out%20ASP>
--
Evertjan.
The Netherlands.
(Please change the x''es to dots in my emailaddress)
这篇关于Global.asa中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!