Ajax request in C # update authentication

2

As I do for every Ajax request, give update to forms authentication cookie.

I want to update no forms authentication in my controller, because it is a calendar screen that uses FullCalendar.

I'm trying to troubleshoot a page, which only does ajax requests and after a while if the user goes to another screen, prompts for login and password.

    
asked by anonymous 09.05.2014 / 14:24

1 answer

1

Two years ago I made AJAX requests without using tools or support APIs.

The target resource for AJAX requests was "Generic Handlers" (with ASHX extension).

After a long time just doing this type of request, Session was timeout, and my user was logged out.

I have corrected, simply adding System.Web.SessionState.IRequiresSessionState to the class inheritance.

Class declaration before (gave timeout and moved):

public class DisponibilidadeHandler : IHttpHandler

Class declaration afterwards (started working OK, no timeout and no shuffle):

public class DisponibilidadeHandler : IHttpHandler, System.Web.SessionState.IRequiresSessionState
    
09.05.2014 / 20:44