473,396 Members | 1,927 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Session_End Breakpoint only steps first line

Hey,

I've got some code in my Session_End which cleans up all Session related
items from the Cache object.
I needed to store some related sessiondata in there to be able to address it
in the AuthenticateRequest event.

Now when I breakpoint the first line to test the Session_End code, it only
breaks on the first line.
A press on F11 through will just jump me out and resumes the program,
ignoring the remaining lines of code.

Does anyone know this problem ?

Regards,

Beren
Nov 18 '05 #1
6 1431
Is it jumping out to hit another breakpoint?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 25 Nov 2004 16:13:31 GMT, "Beren" <be***@angband.me> wrote:
Hey,

I've got some code in my Session_End which cleans up all Session related
items from the Cache object.
I needed to store some related sessiondata in there to be able to address it
in the AuthenticateRequest event.

Now when I breakpoint the first line to test the Session_End code, it only
breaks on the first line.
A press on F11 through will just jump me out and resumes the program,
ignoring the remaining lines of code.

Does anyone know this problem ?

Regards,

Beren


Nov 18 '05 #2
Nope, it just acts as if I would just press F5 to resume again.
Apparently it happens when I address the Cache.

--------
1. Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
2. Dim sUserName As String = Session.Item("UserName").ToString()
3. If Not System.Web.HttpRuntime.Cache.Get(sUserName) Is Nothing Then
4. System.Web.HttpRuntime.Cache.Item(sUserName) = Nothing
5. System.Web.HttpRuntime.Cache.Remove(sUserName)
6. End If
7. End Sub
--------
As you see I have to access the Cache statically to be able to address it.
It bravely runs to line 3, and validates the condition, then it jumps to
line 4, but if
I press F11 I get the same problem.
Apparently addressing objects in this event handler is very fragile...
Then only thing I want to do is to remove a user object from the cache
before the session ends.
"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:j8********************************@4ax.com...
Is it jumping out to hit another breakpoint?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 25 Nov 2004 16:13:31 GMT, "Beren" <be***@angband.me> wrote:
Hey,

I've got some code in my Session_End which cleans up all Session related
items from the Cache object.
I needed to store some related sessiondata in there to be able to address
it
in the AuthenticateRequest event.

Now when I breakpoint the first line to test the Session_End code, it only
breaks on the first line.
A press on F11 through will just jump me out and resumes the program,
ignoring the remaining lines of code.

Does anyone know this problem ?

Regards,

Beren

Nov 18 '05 #3
Hi Beren:

Line 4 is throwing an exception. The cache does not let us store
references to Nothing or null - the Item has to contain a valid object
reference.

Calling Remove will be enough to clear the item from the cache.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 25 Nov 2004 20:11:37 GMT, "Beren" <be***@angband.me> wrote:
Nope, it just acts as if I would just press F5 to resume again.
Apparently it happens when I address the Cache.

--------
1. Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
2. Dim sUserName As String = Session.Item("UserName").ToString()
3. If Not System.Web.HttpRuntime.Cache.Get(sUserName) Is Nothing Then
4. System.Web.HttpRuntime.Cache.Item(sUserName) = Nothing
5. System.Web.HttpRuntime.Cache.Remove(sUserName)
6. End If
7. End Sub
--------
As you see I have to access the Cache statically to be able to address it.
It bravely runs to line 3, and validates the condition, then it jumps to
line 4, but if
I press F11 I get the same problem.
Apparently addressing objects in this event handler is very fragile...
Then only thing I want to do is to remove a user object from the cache
before the session ends.
"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:j8********************************@4ax.com.. .
Is it jumping out to hit another breakpoint?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 25 Nov 2004 16:13:31 GMT, "Beren" <be***@angband.me> wrote:
Hey,

I've got some code in my Session_End which cleans up all Session related
items from the Cache object.
I needed to store some related sessiondata in there to be able to address
it
in the AuthenticateRequest event.

Now when I breakpoint the first line to test the Session_End code, it only
breaks on the first line.
A press on F11 through will just jump me out and resumes the program,
ignoring the remaining lines of code.

Does anyone know this problem ?

Regards,

Beren


Nov 18 '05 #4
Great news !
I just wanted to play completely safe when finishing objects that were in
the Cache.
The weird thing is that any exceptions in the Session_End won't give me any
notification whatsoever...

Thanks,

Beren
"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:g0********************************@4ax.com...
Hi Beren:

Line 4 is throwing an exception. The cache does not let us store
references to Nothing or null - the Item has to contain a valid object
reference.

Calling Remove will be enough to clear the item from the cache.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 25 Nov 2004 20:11:37 GMT, "Beren" <be***@angband.me> wrote:
Nope, it just acts as if I would just press F5 to resume again.
Apparently it happens when I address the Cache.

--------
1. Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
2. Dim sUserName As String = Session.Item("UserName").ToString()
3. If Not System.Web.HttpRuntime.Cache.Get(sUserName) Is Nothing
Then
4. System.Web.HttpRuntime.Cache.Item(sUserName) = Nothing
5. System.Web.HttpRuntime.Cache.Remove(sUserName)
6. End If
7. End Sub
--------
As you see I have to access the Cache statically to be able to address it.
It bravely runs to line 3, and validates the condition, then it jumps to
line 4, but if
I press F11 I get the same problem.
Apparently addressing objects in this event handler is very fragile...
Then only thing I want to do is to remove a user object from the cache
before the session ends.
"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:j8********************************@4ax.com. ..
Is it jumping out to hit another breakpoint?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 25 Nov 2004 16:13:31 GMT, "Beren" <be***@angband.me> wrote:

Hey,

I've got some code in my Session_End which cleans up all Session related
items from the Cache object.
I needed to store some related sessiondata in there to be able to
address
it
in the AuthenticateRequest event.

Now when I breakpoint the first line to test the Session_End code, it
only
breaks on the first line.
A press on F11 through will just jump me out and resumes the program,
ignoring the remaining lines of code.

Does anyone know this problem ?

Regards,

Beren

Nov 18 '05 #5
Do you happen to know how I can call the shared sub
FormAuthentication.SignOut in there ?
This event is really messing me up :(
"Beren" <be***@angband.me> wrote in message
news:yj******************@phobos.telenet-ops.be...
Great news !
I just wanted to play completely safe when finishing objects that were in
the Cache.
The weird thing is that any exceptions in the Session_End won't give me
any notification whatsoever...

Thanks,

Beren
"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:g0********************************@4ax.com...
Hi Beren:

Line 4 is throwing an exception. The cache does not let us store
references to Nothing or null - the Item has to contain a valid object
reference.

Calling Remove will be enough to clear the item from the cache.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 25 Nov 2004 20:11:37 GMT, "Beren" <be***@angband.me> wrote:
Nope, it just acts as if I would just press F5 to resume again.
Apparently it happens when I address the Cache.

--------
1. Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
2. Dim sUserName As String = Session.Item("UserName").ToString()
3. If Not System.Web.HttpRuntime.Cache.Get(sUserName) Is Nothing
Then
4. System.Web.HttpRuntime.Cache.Item(sUserName) = Nothing
5. System.Web.HttpRuntime.Cache.Remove(sUserName)
6. End If
7. End Sub
--------
As you see I have to access the Cache statically to be able to address
it.
It bravely runs to line 3, and validates the condition, then it jumps to
line 4, but if
I press F11 I get the same problem.
Apparently addressing objects in this event handler is very fragile...
Then only thing I want to do is to remove a user object from the cache
before the session ends.
"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:j8********************************@4ax.com ...
Is it jumping out to hit another breakpoint?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 25 Nov 2004 16:13:31 GMT, "Beren" <be***@angband.me> wrote:

>Hey,
>
>I've got some code in my Session_End which cleans up all Session
>related
>items from the Cache object.
>I needed to store some related sessiondata in there to be able to
>address
>it
>in the AuthenticateRequest event.
>
>Now when I breakpoint the first line to test the Session_End code, it
>only
>breaks on the first line.
>A press on F11 through will just jump me out and resumes the program,
>ignoring the remaining lines of code.
>
>Does anyone know this problem ?
>
>Regards,
>
>Beren
>


Nov 18 '05 #6
Hi Beren:

I don't think it would have an effect. What SignOut does is instruct
the browser to remove the forms authentication ticket (a cookie) with
a response header. Since the user isn't actually making a request when
Session_End fires, it is not possible to tell someone to drop a
cookie, know what I mean?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Fri, 26 Nov 2004 01:39:34 GMT, "Beren" <be***@angband.me> wrote:
Do you happen to know how I can call the shared sub
FormAuthentication.SignOut in there ?
This event is really messing me up :(


Nov 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Steve M | last post by:
Why are my sessions lasting so long? I have them set to 20 minute timeout in config file? The Session_End event is getting called an hour or more sometimes--well after the user has stopped...
2
by: Bela | last post by:
Hello I was wondering if someone could help me out with a Session_End problem in my Global.asax. I've tried everything, and still no success Here is the scenario: sessionstate is set to InProc....
5
by: JezB | last post by:
Why is my Session_End event in global.asax never firing ? I've tried fiddling with the timeouts but still nothing. Ideally I want to do some processing whenever someone leaves my web application...
7
by: Henry | last post by:
I have a question on session_end. I'm trying to log into my database when the session times out, it will store user info into a table. When I got step into a line where I was trying to open...
5
by: Ron Vecchi | last post by:
1.) If I want to use an object that was stored in the Application state will it be avilable in the Session_End event. (even on the last session to end)?? 2.) Can I use the current sessions state in...
11
by: OldProgrammer | last post by:
All the documentation and discussion I have read indicate that the Session_End is not supposed to fire unless you are in "inProc" Session state mode, and then only on Session Timeout or at Session...
14
by: Bruno | last post by:
We are attempting to automatically log users off from the Session_End event in global.asax. It is not a critical task, more of a housekeeping task so that we know if users have closed down their...
0
by: noleander | last post by:
Hi. Ive been using Visual C++ for two years on an application. The application is one solution, containing 10 projects. 9 of the projects build libraries (*.lib). I've been debugging the...
8
by: Roger | last post by:
When I call the session.abandon() method, it calls the session_end event. When a user closes the browser or clicks the log off button, I can dispose of objects and abandon the session cleaning....
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.