2

Azure Web サイトで STS を動作させようとしています。そこで、デフォルトのインターネット テンプレートを使用して MVC4 アプリケーションを作成しました。次に、Azure で STS を作成し、[ID とアクセス] メニューを使用してフェデレーション セキュリティをセットアップしました。[Authorize] タグをコントローラーのメソッドに追加すると、ブラウザーは STS に正しくリダイレ​​クトされ、そこで LiveId アカウントを入力できます。しかし、その後、このエラーが発生します

  An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code

[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.]

[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. ]

これを機能させるために多くのことを試みましたが、欠けている小さなものがあると思います。誰かがこの問題に遭遇し、解決策を持っていますか?

4

1 に答える 1

2

このブログをフォローすることで問題は解決しました

http://blogs.msdn.com/b/vbertocci/archive/2013/01/28/running-wif-based-apps-in-windows-azure-web-sites.aspx

VS2012 用の ID およびアクセス ツールを使用している場合は、[構成] タブに移動し、[Web ファーム対応の Cookie を有効にする] チェックボックスをオンにするだけです。</p>

于 2013-02-02T08:34:02.867 に答える