Questions tagged [sessionend]

26 questions
4
votes
1 answer

ASP.NET MVC: Access session data in Session_End or in event just before

I've already seen a similar question to this one posted here. I have essentially the same question, but with a small twist. I'm trying to access Session information from within the Session_End method, but HttpContext is null by the time I get there,…
Matt
  • 23,363
  • 39
  • 111
  • 152
2
votes
1 answer

MVC 2 Antiforgerytoken session issue

I've implemented the antiforgerytoken in my MVC 2 app. I have also added a machine key in the web.config. When the session expires and I try and do a post it throws a A required anti-forgery token was not supplied or was invalid error. It seems…
doogdeb
  • 403
  • 1
  • 4
  • 15
2
votes
1 answer

Clear Cookies on Session_End C#

Is it possible to clear the browser's cookie on Session_End? Given that there is no Context, no Request and no Response? Also, it is not possible to put the values on the session instead of in the cookies. This is being done by a third party…
Ray
  • 627
  • 1
  • 7
  • 19
2
votes
1 answer

how to detect MVC 4 session end

I'm developing my web application using MVC 4, I need to send an email to the user after session time out or after session has been ended by the user. Anyone have any idea how to detect the session end? Thanks
2
votes
3 answers

session in asp.net is getting close after 2-3 minutes

I have made a web application which uses user authentication and if user is authenticated user then i store it in Session like below. Session("uid") = txtUid.text But after 2-3 minutes Session is automatically cleared.
Sarthak Shah
  • 137
  • 1
  • 15
2
votes
1 answer

Session_End called multiple times in the middle of a session

Am I using Session_End incorrectly? In my application, I have a cache to speed up page loads, it works quite well. Recently, someone suggested to me that I was leaking memory by never emptying it out, and to implement a method on Session_End that…
Coxy
  • 8,844
  • 4
  • 39
  • 62
2
votes
3 answers

Where is best to delete temporary files in an ASP.net application?

I create several temporary files in my asp.net app, and I need to delete them when the user is done using them. I tried void Session_End(object sender, EventArgs e) { System.IO.File.Delete(@"C:\Temp\test.doc"); } but it's…
user1608982
1
vote
0 answers

Session End firing in Application Start Up

In my ASP.NET Application, the Session_End method is firing when Application starts up. My break points in that method hits when app starts for the first time. Isn't it supposed to execute only after Session was timed out? why is this weird…
Programmerzzz
  • 1,237
  • 21
  • 48
1
vote
1 answer

Session Ends Automatically

About Application: I build an application in .NET which I have installed on 5 sub domains. for example client1.mydomain.com, client2.mydomain.com . Initially I uploaded this application on a shared server. Issues: I found, sometime user session…
Kartik Goyal
  • 376
  • 1
  • 6
  • 15
1
vote
1 answer

Redirecting to another page from Session_end in global.asax

I need to redirect the user to the login page on session timeout. The issues with Session_End method in the global.asax are:It does not support Response.Redirect or Server.TransferAny attempt to use HttpContext.Current.Response results in 'Object…
Shubhang
  • 297
  • 1
  • 5
  • 13
0
votes
1 answer

Tell Windows I don't need to block its shutdown anymore in WPF application

In my WPF application I'm using SessionEnding Event to prevent from shutting Windows down when my application needs to save data. It works, but I don't know how to tell Windows I don't need to block its shutdown anymore. I have a bool variable that…
0
votes
0 answers

OAuth2 Authorization grant flow not refreshing expired access/ID tokens - Spring Security

When a user's access and ID tokens expire, they should be considered invalid and refreshed using the refresh token. If unable to do so, the user's session should be expired. *(stating from the issue itself) * Issue Reference -…
0
votes
1 answer

How to detect that session time out automatically and redirect to login Action in asp.net MVC?

How to detect that session time out automatically and redirect to login Action in asp.net MVC once session end ? I tried to redirect to login action from Session_End() method but it not working protected void Session_End(Object sender, EventArgs…
0
votes
0 answers

Oracle Apex session end when click a button

In Oracle Apex I have a region that contains a text field and a button that when clicked on a dynamic action is executed and a pl/sql statement runs which inserts the text_field value into a table. The issue is when I click on the button the…
0
votes
0 answers

Make a simple JavaScript Alert pop-up in C# code behind after a session ends

What I am trying to do is that I have used a function in the Global.asax.cs file to detect when a user's login session has expired and if it is expired then the user should be redirected to the login page, code shown below: protected void…
1
2