M
M O J O
Hi!
In the Web.config file I have this:
<sessionState mode="SQLServer" cookieless="false" timeout="1"
sqlConnectionString="data source=localhost;user
id=testuser;password=ds2k3os!93kjd>" />
In my Global.asax I have this:
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
Session("test") = "Started - " & Now.ToString
End Sub
In my WebPage1 I have this:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As_
System.EventArgs) Handles MyBase.Load
If Session.IsNewSession Then
Response.Write("New session!!!! <br><br>")
End If
Response.Write(Session.SessionID.ToString & "<br>" & _
Session("test").ToString & " .")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As_
System.EventArgs) Handles Button1.Click
Label1.Text = Now.ToString
End Sub
Here's my question.....
When I start my application, the Session_Start event is fired.
If I leave my application running for a couple of minutes without
touching the keyboard and then click button1, I expect the Session_Start
event to be fired again, but it's not.
It seams like the session does not timeout.
What am I doing wrong here?
Thanks!!!!!!!!!!!!!
M O J O
In the Web.config file I have this:
<sessionState mode="SQLServer" cookieless="false" timeout="1"
sqlConnectionString="data source=localhost;user
id=testuser;password=ds2k3os!93kjd>" />
In my Global.asax I have this:
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
Session("test") = "Started - " & Now.ToString
End Sub
In my WebPage1 I have this:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As_
System.EventArgs) Handles MyBase.Load
If Session.IsNewSession Then
Response.Write("New session!!!! <br><br>")
End If
Response.Write(Session.SessionID.ToString & "<br>" & _
Session("test").ToString & " .")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As_
System.EventArgs) Handles Button1.Click
Label1.Text = Now.ToString
End Sub
Here's my question.....
When I start my application, the Session_Start event is fired.
If I leave my application running for a couple of minutes without
touching the keyboard and then click button1, I expect the Session_Start
event to be fired again, but it's not.
It seams like the session does not timeout.
What am I doing wrong here?
Thanks!!!!!!!!!!!!!
M O J O