0
I have a website in ASP.NET MVC5 in the company "Vaipapai" (no merchandising here right), this hosting is shared and I can not decide the downtime for the session to fall, in the case as default they put 6 minutes. This is currently a problem because I can’t afford a more personalized service, and I need longer sessions.
It is possible through the server side or the client side to simulate actions in the background, whatever so that the session does not fall at that time, either with c#(server side) or javascript(front side) ?
In the client you can create a call
Ajax
for a server operation and call periodically usingsetTimeout
(https://www.w3schools.com/jsref/met_win_settimeout.asp) for example, or on the server, create a method that uses aTimer
(https://docs.microsoft.com/pt-br/dotnet/framework/winforms/controls/run-procedures-at-set-intervals-with-wf-timer-component) to execute a code that keeps your session active– Ricardo Pontual
Hello, I had to do this a while ago and I implemented this solution and it worked for me: https://gist.github.com/KyleMit/aa4f576fa32bf36fbedab5540c18211d
– Fernando H Matosinhos
@Ricardopunctual I used your method and it worked ;)
– Leonardo Bonetti