簡體   English   中英

x509 證書和身份服務器 v2 的問題

[英]Issues with x509 certificate and identityserver v2

我知道身份服務器 v2 已被棄用,但我正在嘗試解決生產問題。 我們在服務器上安裝了新證書並更新了 web.config 文件中的指紋,但出現以下錯誤。 我查看了 sdf 文件,但沒有找到任何內容。 我也試圖讓跟蹤工作,但我似乎無法生成日志文件(我希望它可以告訴我故障是什么)有什么想法嗎?

<system.identityModel>
<identityConfiguration>
          <audienceUris>
            <add value="https://website.com" />
          </audienceUris>
          <certificateValidation certificateValidationMode="None" />
          <issuerNameRegistry type="System.IdentityModel.Tokens.ValidatingIssuerNameRegistry, System.IdentityModel.Tokens.ValidatingIssuerNameRegistry">
            <authority name="http://identityserver.v2.thinktecture.com/samples">
              <keys>
                <add thumbprint="thecertificatethumbprint" />
              </keys>
              <validIssuers>
                <add name="http://identityserver.v2.thinktecture.com/samples" />
              </validIssuers>
            </authority>
          </issuerNameRegistry>
        </identityConfiguration>
      </system.identityModel>
      <system.identityModel.services>

“/”應用程序中的服務器錯誤。 WIF10201:找不到 securityToken 的有效密鑰映射:'System.IdentityModel.Tokens.X509SecurityToken' 和頒發者:說明:在當前 Web 請求的執行過程中發生了 > 未處理的異常。 > 請查看堆棧跟蹤以獲取有關錯誤及其起源於代碼的更多信息。

異常詳細信息:System.IdentityModel.Tokens.SecurityTokenValidationException:> WIF10201:找不到 securityToken 的有效密鑰映射:'System.IdentityModel.Tokens.X509SecurityToken' 和頒發者:' http ://identityserver.v2.thinktecture.com/samples'。

源錯誤:

執行當前 Web 請求期間生成了未處理的異常。 可以使用下面的異常堆棧跟蹤來識別有關異常來源和位置的信息。

堆棧跟蹤:

[SecurityTokenValidationException: WIF10201: 未找到 securityToken 的有效密鑰映射:'System.IdentityModel.Tokens.X509SecurityToken' 和頒發者:' http ://identityserver.v2.thinktecture.com/samples'。] System.IdentityModel.Tokens.Saml2SecurityTokenHandler。 ValidateToken(SecurityToken token) +1333 System.IdentityModel.Services.TokenReceiver.AuthenticateToken(SecurityToken token, Boolean ensureBearerToken, String endpointUri) +137 System.IdentityModel.Services.WSFederationAuthenticationModule.SignInWithResponseMessage(HttpRequestBase request) +665 System.IdentityModel.AuthenticationServices.Module .OnAuthenticateRequest(Object sender, EventArgs args) +467 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +139 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +197 System.Web.HttpApplication.ExecuteStep (IExecutionStep step, Boolean&completedSynchronously) +8

我最近在遷移到新服務器時遇到了這個問題。 至少對我來說,這與應用程序池的身份無權讀取證書的私鑰有關。 這可以通過證書 mmc 視圖進行管理。

我最終使用了舊的指紋,它開始工作了。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM