473,769 Members | 6,203 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 AuthenticateReq uest 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 1446
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 AuthenticateReq uest 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(ByV al sender As Object, ByVal e As EventArgs)
2. Dim sUserName As String = Session.Item("U serName").ToStr ing()
3. If Not System.Web.Http Runtime.Cache.G et(sUserName) Is Nothing Then
4. System.Web.Http Runtime.Cache.I tem(sUserName) = Nothing
5. System.Web.Http Runtime.Cache.R emove(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.c om...
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 AuthenticateReq uest 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(ByV al sender As Object, ByVal e As EventArgs)
2. Dim sUserName As String = Session.Item("U serName").ToStr ing()
3. If Not System.Web.Http Runtime.Cache.G et(sUserName) Is Nothing Then
4. System.Web.Http Runtime.Cache.I tem(sUserName) = Nothing
5. System.Web.Http Runtime.Cache.R emove(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 AuthenticateReq uest 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.c om...
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(ByV al sender As Object, ByVal e As EventArgs)
2. Dim sUserName As String = Session.Item("U serName").ToStr ing()
3. If Not System.Web.Http Runtime.Cache.G et(sUserName) Is Nothing
Then
4. System.Web.Http Runtime.Cache.I tem(sUserName) = Nothing
5. System.Web.Http Runtime.Cache.R emove(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 AuthenticateReq uest 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
FormAuthenticat ion.SignOut in there ?
This event is really messing me up :(
"Beren" <be***@angband. me> wrote in message
news:yj******** **********@phob os.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.c om...
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(ByV al sender As Object, ByVal e As EventArgs)
2. Dim sUserName As String = Session.Item("U serName").ToStr ing()
3. If Not System.Web.Http Runtime.Cache.G et(sUserName) Is Nothing
Then
4. System.Web.Http Runtime.Cache.I tem(sUserName) = Nothing
5. System.Web.Http Runtime.Cache.R emove(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***** *************** ************@4a x.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 AuthenticateReq uest 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
FormAuthentica tion.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
2806
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 interacting with my site. Anyone have any insight? Thanks in advance
2
4733
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. I have timeout set to 1 min I have a variable in session_start that is incremented each new session, and it is then decremented in Session_End. I use this variable on a web form to show current users online. All of this works just fine, so I...
5
3463
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 (navigates somewhere else or closes the browser).
7
1643
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 connection (I had it set to timeout in 1 minute, and ran it in debug mode), nothing happens. I read somewhere before about how database call can't work with these settings in my web.config file. I'm using <authentication mode="Windows" /> and <identity...
5
1146
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 its own session_end event?? I asked because I am trying to log some data in this event and use both scenarios above but nothing is happening. Thanks! Ron
11
2826
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 Abandon. I need the event to fire at Session timeout in order to capture and store the Datetime this occurs. However in the application I am writing, I have been unable discern any indication that the event is firing. I have used break...
14
2339
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 browsers without logging off first. However, although the code seems to run OK on our development servers, it is not working on the live server. We are using ASP.NET v. 1.1 and SQL Server 2000 on a W2K3 server running IIS 6.
0
3179
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 application for 2 years. One thing that has been happening for several months is a genuine mystery: I cannot set breakpoints in one of the libraries (source code). I can create the breakpoint in the source code editor, but when I attach to the...
8
5770
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. But, when a user either navigates away from the web app and when the session timesout, the session_end event does not seem to fire. Or when else can I dispose of objects? Or is there an event I can you that is fired when a user navigates away from...
0
9589
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10211
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9863
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7409
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3562
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.