For this post, I am using the ComponentSpace ExampleServiceProvider as the SP and idsrv4 with the ComponentSpace NuGet package as the IDP.
I’ve used ComponentSpace a number of times for various Identity projects and have been impressed by their documentation and their support.
I did a series of posts with the .NET version of ComponentSpace and Auth0.
ComponentSpace also have a .NET Core version of the stack
This is a companion piece to the SP version.
I suggest you read that first as this post is a slimmed-down version to avoid repeating everything.
I wrote a post on SAML stacks in order to help people who were stuck with how to implement one of these. It’s a very common question over on stackoverflow.