-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration with On-Premises ADFS #18639
Comments
Noticed that the exception in my original post referred to an assembly unable to be loaded -
|
Can we see your dependencies? |
@blowdart: Would the snapshot below do, or should I export the full inner dependency list from something like the project/solution file ? |
That's fine. Could we also get your startup.cs |
Contents here. I had to take out |
@blowdart ...and happy 10 year anniversary at MS ! :) |
Weird. @Tratcher any ideas here? |
...
It's AddEntityFrameworkStores that adds IUserStore, you'll need to put that back. Maybe it will work now that you fixed the other error. |
@Tratcher the issue is this - if I uncomment
Visual Studio - usually apt of solving such things - presents the fix below, which I'm having serious doubts it's the right way to go about it: |
Sounds like you're missing a package reference to Microsoft.AspNetCore.Identity.EntityFrameworkCore.
You should have that file in your app. Here's the one from the template: Line 9 in 36267e8
|
@Tratcher I've included the class definition in the Startup.cs, so that the file now looks like this. Yet the exception looks even more verbose now:
|
Looks like you're still missing this line from the template:
aspnetcore/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs Lines 56 to 59 in 36267e8
You're also missing aspnetcore/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs Line 153 in 36267e8
https://gist.github.com/luckerby/32c86716ba877f2b3eb170ce2bb3e64d#file-startup-cs-L77 How did you get into this state? Did you create an app without any authentication and then try to add it later? It's not clear that you're intentionally using Identity, WsFed doesn't require it. There's a later section in the doc that shows the simplified setup. (I'm going to ask them to move that up...) |
@Tratcher Ok, how did I end up here. I was using a simplistic app, consisting of just 2 lines of C# code that - using a WsFed relying party on an ADFS on-prem server - would simply print all the claims in a text based output. Visual Studio 2012 was used (back when the Identity wizard was still around). WebDeploy worked great against the servers I needed. Fast forward to VS 2019 and IIS target servers running on Windwos Server 2019, and I'm running into issues with WebDeploy. Therefore it appears I'm faced with 3 options:
Since the 3rd option would be wisest going forward, this is how I got to where I am. What I'm sensing however is that there's just too much code to write for getting something simple to work. I also can't quite figure out why "sql" classes should up in the config. Or maybe I'm just looking at things from the wrong angle. |
Yeah, you want a simpler setup.
Or look at the one I use for testing: |
First, in order to eliminate any wrong assumptions on my side: I've rewritten the realm/metadata values in the corresponding lines as such:
Next I got the following exception:
As explicitly mentioned, I've added the controllers using
Which seems to indicate that either I haven't provided the settings wrong, or I've used some wrong syntax in the first 2 lines I've pasted. |
You'd give direct values like this:
|
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate. See our Issue Management Policies for more information. |
Will test this tomorrow and post back. Sorry about the delay. |
@Tratcher thank you for all your help and patience. It's now working as expected. If someone else comes across this, I've pasted the final version of Startup.cs I've used here. The |
This issue has been resolved and has not had any activity for 1 day. It will be closed for housekeeping purposes. See our Issue Management Policies for more information. |
First, I do realize this has been discussed in the past. Yet some time has passed and maybe now there's a solution. Someone mentioned finding a way to move forward, but not a lot of details were provided.
I'm using .NET Core 3.0 with Microsoft.AspNetCore.Authentication.WSFederation 3.0.2 and using the instructions here, in order to get an ASP.NET Core app to successfully authenticate against an ADFS on-prem instance. The ADFS relying party is configured successfully and the details (metadata and RP URI) are inserted into the code. However while starting the project within Visual Studio 2019 (against a local IISExpress instance) it throws an exception, whose details follow.
The text was updated successfully, but these errors were encountered: