Link to home
Create AccountLog in
.NET Programming

.NET Programming

--

Questions

--

Followers

Top Experts

Avatar of R8VI
R8VI

Global.asax, c#, session_end
HI,

I want to increase the timeout for calling the session_end i know by default its set to 20 minutes but i want to increase it to 2 hours please help

Thanks,

R8VI

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of Navneet HegdeNavneet Hegde🇺🇸

Hi!

Check this link
http://forums.asp.net/t/1283350.aspx


Thanks!

Avatar of kaufmedkaufmed🇺🇸

You can alter the timeout property of the sessionState element within web.config. See http://msdn.microsoft.com/en-us/library/h6bb9cz9.aspx for more information.

Avatar of R8VIR8VI

ASKER

Hi,

Thanks for this so what you are saying is that I have to set it at IIS level, is this right ?


And since I havent installed IIS on my PC i wont be able to test it until it goes to live on the server is this right, as the server has IIS ?


Thanks,

R8VI

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of kaufmedkaufmed🇺🇸

You should be able to test against the VS web server as well.

Avatar of R8VIR8VI

ASKER

Could you please advise how as that first link suggests IIS

Avatar of R8VIR8VI

ASKER

Sorry I was being silly, i know what you mean like http://localhost:2546/xyz.aspx
So i tried setting the setting it in the webconfig like

<system.web>
     <sessionState timeout="120"></sessionState>
  </system.web>


but the session_end still seems to be called every 20 mins

please help

Thanks,

R8VI

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


ASKER CERTIFIED SOLUTION
Avatar of kaufmedkaufmed🇺🇸

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of R8VIR8VI

ASKER

Hi,

Thanks for this but how do i match up the global.asax file that i have to what u have done?

also I only have Session.Abandon called on when a user clicks logout button, but the button is on the master page

i set set thefollowing on log in
 FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(2, txtUsername.Text.ToString(), DateTime.Now, DateTime.Now.AddHours(2), false, sID);

thanks

r8vi

Avatar of kaufmedkaufmed🇺🇸

My attached project was merely to demonstrate that setting the value in web.config did not rely on IIS.

There are two concepts of timeout in ASP.NET: a forms timeout and a session timeout. Both can be configured independently of each other. Are you certain that it's your session that is timing out and not your forms authentication that is timing out?

Avatar of R8VIR8VI

ASKER

Hi,

In my webconfig I also have the following for my forms authentication

<authentication mode=forms>
<timeout=2880>
<authentication>

However in the session state I removed mode=improc

And it seems to e working now

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of kaufmedkaufmed🇺🇸

Be aware that a forms timeout does not cause or imply a session timeout, and it is entirely plausible for a form timeout to occur and the session to still be active. This is by design.

Avatar of R8VIR8VI

ASKER

Yep I know this I always had form authentication as well as I wanted the forms to timeout at 2 hours and the same with session as well
.NET Programming

.NET Programming

--

Questions

--

Followers

Top Experts

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.