Change login session timeout.
Question

I'm trying to change the login session timeout. I implemented the configuration in the following article.

https://success.outsystems.com/Documentation/Development_FAQs/How_to_change_the_timeout_of_a_session

I changed the timeout to 1 (for testing purposes) I republished the e-spaces that contains my screens and my theme from service center and republished the standard e-space "users" from service center. However I won't logout after 1 minute. 

I made sure I didn't checked to remember the login information while logging in. And checked that there where no ajax requests (or any request) going to the server using fiddler (http traffic monitor).

Could anyone tell me what i could be doing wrong?


My best guess would be that this is because the login session is kept within "(system)". Problem is I can't add a configuration or republish (system)

Solution

Hello Mark,

Never used the Factory Configuration.

To control the session timeout on an application, we just create a simple extension with a method to set the session timeout, and use this inside it:

HttpContext.Current.Session.Timeout = ssMinutes;

HttpContext comes from the System.Web

As you can see, we are dealing with .NET only here.
Maybe this can be useful, if you also are using .NET and are not using other settings from Factory Configuration.

Cheers.

Hi @Eduardo Jauch ,


Firstly I apologies for commenting on an old post but I really need help with this, I created extension with a method that has one input parameter (type integer- to pass minutes to set) and then I used

"HttpContext.Current.Session.Timeout = ssMinutes;" to set session time out but I am getting below error

"Object Reference not set to an instance of an object". Can you please let me know what I am doing wrong here.


Thanks 

Shivangi

Hi @Shivangi Thakur,
I've done the same thing as you did. Got the same error message. Do you have the solution for this case already?

Hi Mark,

Iirc, we configured the timeout via the IIS interface, but I may be wrong. Anyway, did you do an iisreset afterwards?

Solution

Hello Mark,

Never used the Factory Configuration.

To control the session timeout on an application, we just create a simple extension with a method to set the session timeout, and use this inside it:

HttpContext.Current.Session.Timeout = ssMinutes;

HttpContext comes from the System.Web

As you can see, we are dealing with .NET only here.
Maybe this can be useful, if you also are using .NET and are not using other settings from Factory Configuration.

Cheers.

Hi @Eduardo Jauch ,


Firstly I apologies for commenting on an old post but I really need help with this, I created extension with a method that has one input parameter (type integer- to pass minutes to set) and then I used

"HttpContext.Current.Session.Timeout = ssMinutes;" to set session time out but I am getting below error

"Object Reference not set to an instance of an object". Can you please let me know what I am doing wrong here.


Thanks 

Shivangi

Hi @Shivangi Thakur,
I've done the same thing as you did. Got the same error message. Do you have the solution for this case already?

If you need to increase the session timeout for your entire application landscape, that seems not the way to go :). Just adjust the timeout in IIS (see e.g. here), restart IIS (iisreset) and it should work.

Hi Killian, 


Can you share again the link to the timeout configuration in IIS?


Tks

Hi Diana,

Since this is not OutSystems-specific, you should just Google for asp.net session timeout and you should find usuable answers.

I agree. If the timeout must be defined for an entire Environment, than Kilian's way is the way to go. 

If you don't have access to the IIS server (OutSystems cloud), it is possible to ask them to help changing the settings.

In two weeks I'll have an environment where I can test the Factory Configuration, and will test it, as it can be useful in the above scenario, for example.

Cheers.

Thank all, i went for solution to set the timeout with the .NET variable since i don't want it for all the modules.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.