Session_End called when project is rebuilt

G

Guest

Thanks in advance for any help....

I have an application that uses the Session_End to perform some data access
against our database. This works as expected when a session times out.

However, when the .NET project is rebuilt the Session_End is automatically
called for any current sessions. However on rebuild I do not want my code in
Session_End to be called.

Can anyone explain why the Session_End is called or have a potential work
around so that my code in Session_End is not run when the project is rebuilt.
 
M

Matt Berther

Hello PCK,

Presumably because the dll changes. ASP.NET has a watch on the web.config
and the dll files. If these files change, the application is restarted (which
means all previous sessions will be dropped).

I'm concerned about why this is an issue... You're not rebuilding code on
a production site, are you?
 
G

Guest

Thanks for the reply Matt.

No I do not rebuild on production. But I will be building in development
and then publishing to production. I assume that this would make the same
dll changes as rebuilding production. Am I incorrect to assume this?

PCK
 
W

William F. Robertson, Jr.

When you push a new version out to production, it will cause an application
restart, thus ending all the sessions.

Try deploying at night, or when traffic activity is low.

bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Session_End 14
Global.asax Session_End()... 2
Session_End() 1
Session_End event, System.NullReferenceException 1
Session_End 4
School Project 1
Session_End 3
Suggestions for new Website project 3

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top