簡體   English   中英

ADFS 集成證書錯誤與 asp.net

[英]ADFS integration certificate error with asp.net

我有一個 asp.net 網站,該網站使用 ADFS 身份驗證讓用戶訪問該網站。

我已經根據從 RP 收到的配置在 ADFS 和 web.config 中配置了網站。

當我鍵入 url 時,它會被重定向到我放置有效憑據的 ADFS 網站。 令牌是來自 ADFS 的問題(我檢查了日志)。 但是,在重定向到我的網站后,我看到如下異常。

The X.509 certificate CN=staging.companynet.com, O=Company, L=Issy-Les-Moulineaux, S=Ile-de-France, C=FR is not in the trusted people store. The X.509 certificate CN=staging.companynet.com, O=Company, L=Issy-Les-Moulineaux, S=Ile-de-France, C=FR chain building failed. The certificate that was used has a trust chain that cannot be verified. Replace the certificate or change the certificateValidationMode. A certificate chain could not be built to a trusted root authority.

異常詳細信息中的更多信息:

The certificate that was used has a trust chain that cannot be verified. Replace the certificate or change the certificateValidationMode. A certificate chain could not be built to a trusted root authority.

[SecurityTokenValidationException: ID4257: X.509 certificate 'CN=staging.companynet.com, O=Company, L=Issy-Les-Moulineaux, S=Ile-de-France, C=FR' validation failed by the token handler.]
   Microsoft.IdentityModel.Tokens.Saml11.Saml11SecurityTokenHandler.ValidateToken(SecurityToken token) +1584
   Microsoft.IdentityModel.Tokens.SecurityTokenHandlerCollection.ValidateToken(SecurityToken token) +127
   Microsoft.IdentityModel.Web.TokenReceiver.AuthenticateToken(SecurityToken token, Boolean ensureBearerToken, String endpointUri) +147
   Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.SignInWithResponseMessage(HttpRequest request) +508
   Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs args) +323
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +142
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +75
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +93

該證書已安裝在“受信任的根證書頒發機構”中。 我已經在另一個服務器環境中配置了相同的網站並且它工作正常。 我看到的唯一區別是當我在新服務器上打開證書時,在第一個選項卡上我看到一條說明“Windows 沒有足夠的信息來驗證此證書”,而在另一台服務器上它顯示“證書適用於以下目的.....” 其他區別是,在“證書路徑”選項卡上,它顯示 - “找不到此證書的頒發者。” 它在其他服務器上顯示的位置 - “證書正常” 這可能是此錯誤背后的原因嗎? 我該如何解決它。

原來,服務器限制了網絡訪問。 在證書詳細信息選項卡下,授權信息訪問有 url 作為訪問方法提及。 我在服務器上解鎖了提到的 URL 並且證書路徑開始顯示證書有效。 此后錯誤被刪除。

暫無
暫無

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

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