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, IDictionary
2 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