2

我正在使用 Kentor Auth Services 并试图让它与 Thinktecture Identity Server 一起使用。读取元数据时出现此错误:

序列不包含任何元素

这是我在 Startup.cs 文件中使用的代码:

        var authServicesOptions = new Kentor.AuthServices.Owin.KentorAuthServicesAuthenticationOptions(false)
        {
            SPOptions = new SPOptions
            {
                EntityId = new EntityId("https://dev.identity.research.ufl.edu:4432/AuthServices")
            },

            SignInAsAuthenticationType = signInAsType,
            AuthenticationType = "saml2p",
            Caption = "SAML2p",
        };

        authServicesOptions.IdentityProviders.Add(new IdentityProvider(
          new EntityId("urn:edu:ufl:dev:00856"),
          authServicesOptions.SPOptions)
        {
            MetadataLocation = "https://dev.identity.research.ufl.edu:4432/EMvc/Metadata.txt",               
        });

        app.UseKentorAuthServicesAuthentication(authServicesOptions);  

我还包括错误消息和下面的堆栈跟踪的一部分。

非常感谢您在如何解决此错误方面提供的任何帮助。

此致,谢丽尔·比尔登

[InvalidOperationException:序列不包含元素] System.Linq.Enumerable.Single(IEnumerable 1 source) +310 Kentor.AuthServices.IdentityProvider.ReadMetadataIdpDescriptor(ExtendedEntityDescriptor metadata) +108 Kentor.AuthServices.IdentityProvider.ReadMetadata(ExtendedEntityDescriptor metadata) +132 Kentor.AuthServices.IdentityProvider.DoLoadMetadata() +127 Kentor.AuthServices.IdentityProvider.ReloadMetadataIfRequired() +169 Kentor.AuthServices.IdentityProvider.CreateAuthenticateRequest(AuthServicesUrls authServicesUrls) +73 Kentor.AuthServices.WebSso.SignInCommand.InitiateLoginToIdp(IOptions options, IDictionary2 relayData, AuthServicesUrls urls, IdentityProvider idp, Uri returnUrl) +36 Kentor.AuthServices.WebSso.SignInCommand.Run(EntityId idpEntityId, String returnPath, HttpRequestData request, IOptions 选项,IDictionary`2 relayData) +447 Kentor.AuthServices.Owin.d__1.MoveNext() +781

4

0 回答 0