M
Mikael Hellström
Hi, I have some huge problem. I fell sick for several days because of this
global.asa file problem
This is my problem:
I don't have any problem what so ever home on my local computer. Everything
work like a dream.
But on the webhotell nothing seems to be ok. It seems like session OnEnd
nerver execute..?
I have done the following tests.
1) SUB Application_OnStart will run because Application("namn") give me the
value "test" so will the function
Session_OnStart
2) I have put this code in session OnEnd
response.redirect(http://www.someurl.com) but it wont redirect me
to that url.
3) I have tryed to replace the code strSQL="delete from online where
medlemsNr=" & session("medlemsNr")
to strSQL="delete from online where medlemsNr=100000" dont work!!!
Soo as i can see it Session OnEnd is never called Why??
I'm on a Window IIS account and use a Microsoft sql server 2000
Regards Mikael
======================== My global.asa =====================================
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
SUB Application_OnStart
Application("aktivanu") = 0
Application("namn") = "test"
END SUB
SUB Session_OnStart
Session.Timeout = 10
application.Lock
application("aktivanu") = Application("aktivanu") + 1
application.Unlock
END SUB
SUB Session_OnEnd
application.Lock
application("aktivanu") = Application("aktivanu") - 1
application.Unlock
strCon = connectionStr="Driver={SQL
Server};Server=mssql.webbhotellsgruppen.se;Uid=XXXX;Pwd=XXXXX;Database=XXXXX
XDB;"
Dim objConn ' ADO Recordset Object
Dim objRS ' ADO Connection Object
Dim strSQL
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString=strCon
objConn.Open
strSQL="delete from online where medlemsNr=" & session("medlemsNr")
objConn.Execute strSQL
End sub
</script>
<OBJECT
RUNAT="Server"
SCOPE="Application"
ID="ChatUsers"
PROGID="Scripting.Dictionary">
</OBJECT>
<OBJECT
RUNAT="Server"
SCOPE="Application"
ID="conquerChatRooms"
PROGID="Scripting.Dictionary">
</OBJECT>
<OBJECT
RUNAT="Server"
SCOPE="Application"
ID="ChatMessages"
PROGID="Scripting.Dictionary">
</OBJECT>
global.asa file problem
This is my problem:
I don't have any problem what so ever home on my local computer. Everything
work like a dream.
But on the webhotell nothing seems to be ok. It seems like session OnEnd
nerver execute..?
I have done the following tests.
1) SUB Application_OnStart will run because Application("namn") give me the
value "test" so will the function
Session_OnStart
2) I have put this code in session OnEnd
response.redirect(http://www.someurl.com) but it wont redirect me
to that url.
3) I have tryed to replace the code strSQL="delete from online where
medlemsNr=" & session("medlemsNr")
to strSQL="delete from online where medlemsNr=100000" dont work!!!
Soo as i can see it Session OnEnd is never called Why??
I'm on a Window IIS account and use a Microsoft sql server 2000
Regards Mikael
======================== My global.asa =====================================
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
SUB Application_OnStart
Application("aktivanu") = 0
Application("namn") = "test"
END SUB
SUB Session_OnStart
Session.Timeout = 10
application.Lock
application("aktivanu") = Application("aktivanu") + 1
application.Unlock
END SUB
SUB Session_OnEnd
application.Lock
application("aktivanu") = Application("aktivanu") - 1
application.Unlock
strCon = connectionStr="Driver={SQL
Server};Server=mssql.webbhotellsgruppen.se;Uid=XXXX;Pwd=XXXXX;Database=XXXXX
XDB;"
Dim objConn ' ADO Recordset Object
Dim objRS ' ADO Connection Object
Dim strSQL
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString=strCon
objConn.Open
strSQL="delete from online where medlemsNr=" & session("medlemsNr")
objConn.Execute strSQL
End sub
</script>
<OBJECT
RUNAT="Server"
SCOPE="Application"
ID="ChatUsers"
PROGID="Scripting.Dictionary">
</OBJECT>
<OBJECT
RUNAT="Server"
SCOPE="Application"
ID="conquerChatRooms"
PROGID="Scripting.Dictionary">
</OBJECT>
<OBJECT
RUNAT="Server"
SCOPE="Application"
ID="ChatMessages"
PROGID="Scripting.Dictionary">
</OBJECT>