Hi all: I'm programming a C# based SignalR client that interacts with a SignalR server behind a IIS server requiring Forms authentication. Based on the user credentials, the server returns both a persistent and not persistent ticket with a expiration time of, say, 30 minutes (no sliding expiration is used by security matters).
In the client side I get the ticket and I can see that, when using the right user, it is marked as persistent though it comes with a expiration date 30 minutes older than the creation date. I assign the cookie to the HubConnection (using CookieContainer.Add method) and everything works right until the ticket expires.
Even being persistent, when the ticket expires it becomes removed from the HubConnection CookieContainer and I'm not able to connect again to the server until I create a brand new connection with a fresh ticket.
UPDATE
After carefully debugging the problem, it seems that the persistent tickets are not properly handled by IIS7 and IIS8 servers: Though they are generated as persistent (the property FormsAuthenticationTicket.IsPersistent is true) they come with expiration date (the property FormsAuthenticationTicket.Expiration contains the result of adding the ticket timeout to the FormsAuthenticationTicket.IssueDate property) and in fact they expire after the ticket timeout, so every SignalR hub method invocation returns an Unathorized (HTTP code 401) error. This is the web.config configuration being used:
<system.web>
<authentication mode="Forms">
<forms loginUrl="Auth/Ticket.aspx" defaultUrl="/" slidingExpiration="false" timeout="30"/>
</authentication>
</system.web>
I've tried some solutions explained here and here with no luck.