Windows アプリを使用してホストされている SignalR アプリケーションがあります。長い話ですが、セルフホスティングの方が簡単です。
正常に動作していましたが、昨日、Visual Studio でデバッグ モードで実行すると、接続試行後に 400 エラーが返されましたThe ConnectionId is in the incorrect format.
。
私はログを見ました - 何もありません。次に、トレースを有効にすると、次のことがわかりました。
SignalR.HubDispatcher Information: 0 : Failed to process connectionToken: System.Security.Cryptography.CryptographicException: Key not valid for use in specified state.
at System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope)
at System.Security.Cryptography.DpapiDataProtector.ProviderUnprotect(Byte[] encryptedData)
at System.Security.Cryptography.DataProtector.Unprotect(Byte[] encryptedData)
at Microsoft.Owin.Security.DataProtection.DpapiDataProtector.Unprotect(Byte[] protectedData)
at Microsoft.AspNet.SignalR.Infrastructure.DataProtectionProviderProtectedData.Unprotect(String protectedValue, String purpose)
at Microsoft.AspNet.SignalR.PersistentConnection.TryGetConnectionId(HostContext context, String connectionToken, String& connectionId, String& message, Int32& statusCode)
それを修正する方法はありますか?
私は 1 時間 Google を調べました。誰もが Web ファーム、証明書ストア、ロード バランサーについて話しているのです。私はそのどれも持っていません、私は信じています。
Windows 7 で SignalR 2.2.1 と共に .NET 4.5 を使用しています。問題があれば、ブラウザーと VS の両方が同じ Windows アカウントから起動されます。