Global.asax question

ttkalec1

Newcomer
Joined
Feb 26, 2005
Messages
19
I have this simple code to execute an SQL query
Code:
        Dim PretragaAdapter As New mysite.DataSet1Adapters.PRETRAGATableAdapter()
        PretragaAdapter.DeletePoDatumu()

It deletes some rows from a table.
When I put this command in a button everything works just fine, and rows get deleted.

But I want to put it in Global.asax file in Session_end section, so everytime an session ends, this command gets executed

The problem is that this command doesn't work in Session_end event.
I know a session lasts for about 20min, but after couple hours I still don't see any changes in my database.:confused:
 
Are you storing your session in either SQlServer or a StateServer rather than InProc? If so the session end event will never fire.

Are you using exactly that code above or is the code in the session end slightly different?
 
The code is exactly the same.
I don't know where I'm storing my sessions. Probably InProc cause I didn't configure it otherwise.

How do I configure it to be stored in SQLServer or StateServer?

Does Session_start gets executed if it's configured to be stored InProc?
 
OK, I managed to find out how to configure my SQL server and application to store my session objects...
tnx alot for your answer ;)
 
Back
Top