LoadClientAsync(id) on ClientController used to trip an
IndexOutOfRangeException at the InMemory shaper for any
.Include() of one of three Client navs: RedirectUris,
AllowedScopes, AllowedGrantTypes. Five other Client navs (with
the same EF shape and the same application-level config) worked
fine.
Bisection pointed at the InMemory provider; that hypothesis was
wrong. The real cause is in ApplicationDbContext.OnModelCreating:
yavsc was redeclaring the HasOne<Client>().WithMany(...).
HasForeignKey(e => e.ClientId) for all eight Client* navs. The
same relation is already declared (more completely, with
.IsRequired().OnDelete(DeleteBehavior.Cascade)) by
IdentityServer8's ConfigureClientStore via ModelBuilderExtensions.
The redundant mapping on three specific entities — ClientScope,
ClientRedirectUri, ClientGrantType — interacts with the InMemory
provider's shaper in a way that throws IndexOutOfRange. Removing
the redundancy fixes it.
This commit also walks back
|
||
|---|---|---|
| .. | ||
| Controllers | ||
| Fakes | ||
| Mandatory | ||
| NonRegression | ||
| Resources | ||
| Smoke | ||
| appsettings.json | ||
| ComputeKidTests.cs | ||
| Directory.Packages.props | ||
| DumpHtml.cs | ||
| EstimateSignatureFileHelperTests.cs | ||
| StaticAssetsPathsTests.cs | ||
| test.runsettings | ||
| TestUserMiddleware.cs | ||
| TestUserStartupFilter.cs | ||
| TestWebApplicationFactory.cs | ||
| WebServerFixture.cs | ||
| xunit.runner.json | ||
| Yavsc.Org.Tests.csproj | ||