У нас есть проблема с использованием SessionAuthenticationModule в IIS 6, при попытке доступа к приложению возникает следующее исключение:
Операция по защите данных не удалась. Это могло быть вызвано тем, что профиль пользователя не был загружен для пользовательского контекста текущего потока, что может иметь место, когда поток олицетворяет себя.
Что мне удалось выяснить, так это то, что можно включить профили в IIS 7, но наша хостинговая компания использует IIS 6. Есть идеи, что делать? Что-то попробовать или просто общие идеи?
Трассировки стека:
[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.]
System.Security.Cryptography.ProtectedData.Protect(Byte[] userData, Byte[] optionalEntropy, DataProtectionScope scope) +456
Microsoft.IdentityModel.Web.ProtectedDataCookieTransform.Encode(Byte[] value) +54
[InvalidOperationException: ID1074: A CryptographicException occurred when attempting to encrypt the cookie using the ProtectedData API (see inner exception for details). If you are using IIS 7.5, this could be due to the loadUserProfile setting on the Application Pool being set to false. ]
Microsoft.IdentityModel.Web.ProtectedDataCookieTransform.Encode(Byte[] value) +146
Microsoft.IdentityModel.Tokens.SessionSecurityTokenHandler.ApplyTransforms(Byte[] cookie, Boolean outbound) +47
Microsoft.IdentityModel.Tokens.SessionSecurityTokenHandler.WriteToken(XmlWriter writer, SecurityToken token) +470
Microsoft.IdentityModel.Tokens.SessionSecurityTokenHandler.WriteToken(SessionSecurityToken sessionToken) +89
Microsoft.IdentityModel.Web.SessionAuthenticationModule.WriteSessionTokenToCookie(SessionSecurityToken sessionToken) +123