2016-04-07 12 views
5

ho schierato un'applicazione ASP.NET MVC 5 6 su Azure, e sono imbattuto in questo problema con SignalR 2: quando si avvia la connessione dal client, chiamata aSignalR 2 fallisce su Azure

/signalr/negotiate?clientProtocol=1.5&connectionData=%5B%7B"name"%3A"gameHub"%7D%5D&_=1460028930688 

fallisce con l'errore 500 .

L'eccezione dietro errore 500 è questo:

Exception Details: System.Security.Cryptography.CryptographicException: The data protection operation was unsuccessful. This may have been caused by not having the user profile loaded for the current thread's user context, which may be the case when the thread is impersonating.

errore Origine:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

dello stack:

[CryptographicException: The data protection operation was unsuccessful. This may have been caused by not having the user profile loaded for the current thread's user context, which may be the case when the thread is impersonating.]

Ho letto e la soluzione provato suggerito a SignalR CryptographicException on AzureWebsites, ma id non ha funzionato per me.

Come ho capito, Azure non consente LoadUserProfile.

Qualsiasi soluzione alternativa?

+0

Sei riuscito a risolvere questo? Sto avendo lo stesso problema – michaelmsm89

+0

Ho cercato di risolvere anche questo errore. SignalR funziona bene localhost, ma mi schiero su Azure e Internal 500 error. – JoshYates1980

risposta

3

Ho avuto lo stesso problema e la mia fix è stato quello di aggiungere una chiamata al UseAesDataProtectorProvider() prima della mia chiamata a MapSignalR(). Spero che questo aiuti qualcuno.

+0

yay! questo funziona grazie – Nicolocodev