Talking about session

xiaoxiao2021-03-06  66

Talking about Session_ONEND debugging

[Date: 2003-12-23] Source: Author: [Font: Big Middle Small]

Session_ONEND is more difficult to debug, because: 1. There is no error message (this is no wonder, there is no place to prompt, I don't know where to put the error message to let go). Second, in most cases, you can't use session.abandon to manually release the seesion for debug - you release all sessions, then do you use the session object in Session_OND? So, I have to wait for the SESSION timeout. Fortunately, the session timeout can be set up, set up a small point, such as 2 minutes or 1 minute. Third, if you have only one computer, it is more difficult to debug, the reason I don't have to say it. Below I gave you a little experience when I debug session_onend: First, don't doubt your session_onend no implementation (in fact, I have been suspected, because I always believe that my session_onedn event is not wrong), often listen some people Complament: "How is my session_onend did not execute, session_onstart is a good" Of course, session_onstart is easy to see. If you don't believe, you put a tag in the first line of session_onend. Sub session_onend application ("flag1") = "session_onend has been executed" .......... The following is your session_onend content End Sub then wait for the session timeout, use Apptest.asp? key = flag1 (APPTEST.ASP) View the value of Application ("Flag1"), you will definitely see "session_onend has already been executed." So, once your session_onend does not reach your purpose, you should review your session_onend event whether there is a write - like the ASP file, once you encounter an error, you immediately stop executing ... II. Write the session_onend event must be carefully To ensure that each word will not be wrong, it is guaranteed that there is no syntax without a logical error. This can only help you with your eyes and think.

Here is the method when I am debugging the session_onend event for a university reference: I have a few tags in the following programs: Flag1, Flag2, Flag3, Flag4, Flag5