ttkalec1 Posted June 3, 2008 Posted June 3, 2008 I have this simple code to execute an SQL query 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: Quote
Administrators PlausiblyDamp Posted June 4, 2008 Administrators Posted June 4, 2008 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? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
ttkalec1 Posted June 4, 2008 Author Posted June 4, 2008 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? Quote
ttkalec1 Posted June 4, 2008 Author Posted June 4, 2008 OK, I managed to find out how to configure my SQL server and application to store my session objects... tnx alot for your answer ;) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.