Webサイトでの認証にWIFSSOを使用しています。開発環境ではすべてが完璧に機能します。しかし、展開時に問題が発生しました
メッセージ:データ保護操作は失敗しました。これは、現在のスレッドのユーザーコンテキストに対してユーザープロファイルがロードされていないことが原因である可能性があります。これは、スレッドが偽装している場合に発生する可能性があります。ExceptionStackTrace:System.Security.Cryptography.ProtectedData.Protect(Byte [] userData、Byte []optionalEntropy、DataProtectionScopeスコープ)at Microsoft.IdentityModel.Web.ProtectedDataCookieTransform.Encode(Byte [] value)
この問題を検索すると、このスタックオーバーフローの質問につながります 。LoadUserProfile= TrueなしでWIFを実行することは可能ですか? 上記のコードを追加しましたが、現在は
値をnullにすることはできません
e.ServiceConfiguration.ServiceCertificateServiceCertificatenullを取得しています。私の質問は、これはどのような種類の証明書であり、構成のどこでこれを定義できるかということです。ACSに同じ証明書を配置する必要がありますか?
これが私の設定セクションです
<microsoft.identityModel>
<service>
<audienceUris>
<add value="http://localhost:9494/" />
</audienceUris>
<federatedAuthentication>
<wsFederation passiveRedirectEnabled="true" issuer="https://devworks-sb.accesscontrol.appfabriclabs.com/v2/wsfederation" realm="http://localhost:9494" requireHttps="false" />
<cookieHandler requireSsl="false" />
</federatedAuthentication>
<applicationService>
<claimTypeRequired>
<!--Following are the claims offered by STS 'https://devworks-sb.accesscontrol.appfabriclabs.com/'. Add or uncomment claims that you require by your application and then update the federation metadata of this application.-->
<claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" optional="true" />
<claimType type="http://schemas.microsoft.com/ws/2008/06/identity/claims/role" optional="true" />
<!--<claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier" optional="true" />-->
<!--<claimType type="http://schemas.microsoft.com/accesscontrolservice/2010/07/claims/identityprovider" optional="true" />-->
</claimTypeRequired>
</applicationService>
<issuerNameRegistry type="Microsoft.IdentityModel.Tokens.ConfigurationBasedIssuerNameRegistry, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<trustedIssuers>
<add thumbprint="BE9D0A516BEC2BC820C23D5C2EA79F068C094382" name="https://devworks-sb.accesscontrol.appfabriclabs.com/" />
</trustedIssuers>
</issuerNameRegistry>
</service> </microsoft.identityModel>
ありがとう