I am doing a website with asp.net. i have used session variable in my global.asax file. the code is given below:

Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
Session.Timeout = 100
Session("Loggedin") = "No"
End Sub

Sub Session_End(Sender As Object, E As EventArgs)
' Code that runs when a session ends

Session.Abandon()
Response.Redirect("index.aspx")
End Sub

And in webconfig i have used the following information inside <system.web> tag :

<sessionState mode="InProc"
cookieless="false"
timeout="120"/>

<pages buffer="false"
enableSessionState="true"
smartNavigation="false"
autoEventWireup="true"
validateRequest="false"
enableViewStateMac = "false"
enableViewState="true"/>

Even after using these things when i login suddenlt after a min i am logged out though i am adding records at the moment.
Please please tell me where i am going wrong. I have to give this project to my boss soon and i am stuck here since i am not

able find out the problem why the session expires and i am logged out and send back to the login page.
Seema

(Mail ID: gaur.seema at rediffmail.com)