简体   繁体   English

登录ADFS时出现错误-System.FormatException:索引(从零开始)必须大于或等于零且小于大小

[英]While login ADFS getting Error- System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size

The Federation Service encountered an error while processing the SAML authentication request. 联合身份验证服务在处理SAML身份验证请求时遇到错误。

Additional Data 附加数据

Exception details: 例外详情:

System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
   at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.Format(IFormatProvider provider, String format, Object[] args)
   at Microsoft.IdentityServer.SR.GetString(String name, Object[] args)
   at Microsoft.IdentityServer.Web.Protocols.Saml.SamlProtocolManager.ValidateSignatureRequirements(SamlMessage samlMessage)
   at Microsoft.IdentityServer.Web.Protocols.Saml.SamlProtocolManager.Issue(HttpSamlRequestMessage httpSamlRequestMessage, SecurityTokenElement onBehalfOf, String sessionState, String relayState, String& newSamlSession, String& samlpAuthenticationProvider, Boolean isUrlTranslationNeeded, WrappedHttpListenerContext context, Boolean isKmsiRequested)

I got this when my relying party wasn't signing the requests but ADFS was expecting signed requests. 当我的依赖方未签署请求但ADFS期待已签署的请求时,我得到了此消息。 It's clearly a bug in the error message creation code in ADFS. 显然,这是ADFS中错误消息创建代码中的错误。

Try turning it off in Power Shell with: 尝试使用以下方法在Power Shell中将其关闭:

Set-ADFSRelyingPartyTrust -TargetIdentifier your-sp-identifier -SignedSamlRequestsRequired $false

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM