Skip to content
This repository has been archived by the owner on Oct 17, 2018. It is now read-only.

Could not load RemoteAuthenticationOptions #20

Closed
ravikumarsureshbabu opened this issue Sep 8, 2017 · 5 comments
Closed

Could not load RemoteAuthenticationOptions #20

ravikumarsureshbabu opened this issue Sep 8, 2017 · 5 comments

Comments

@ravikumarsureshbabu
Copy link

Hello,
I am using wsfed nugget version 1.1.0 for ASP net core 2 application. It compiles succusfully but on run, it fails with following exception.

System.TypeLoadException occurred
HResult=0x80131522
Message=Could not load type 'Microsoft.AspNetCore.Builder.RemoteAuthenticationOptions' from assembly 'Microsoft.AspNetCore.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

Does wsfed work for asp core 2 ? or Am I missing anything ?

@ravikumarsureshbabu ravikumarsureshbabu changed the title COuld not load RemoteAuthenticationOptions Could not load RemoteAuthenticationOptions Sep 8, 2017
@chrisdrobison
Copy link
Owner

chrisdrobison commented Sep 9, 2017 via email

@ravikumarsureshbabu
Copy link
Author

Thanks for responding Chris. I am trying to use the code thats in the pull request by @michaeljfarr. Do you think using those code changes should be fine for asp net core 2 ? I have problems with getting the prompt for authentication with those changes.

@chrisdrobison
Copy link
Owner

chrisdrobison commented Sep 9, 2017 via email

@michaeljfarr
Copy link

Ravi, we are waiting on the next release from https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet to get things to the next stage. We have been waiting for a while, check out this thread: AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#595

Essentially, both our implementations are a bit of an experiment because the WsFederationMessage library introduces a versioning conflict that makes it unworkable in many situations. Hopefully, that library (mentioned above) will be released soon and target netstandard2.0. I haven't checked see if they are actually implementing the RemoteAuthenticationHandler though ...

The other big implementation issue on my branch is that I'm not maintaining those extension points (the "events"). If you don't mind the fact that the extension points are totally untested, I wont mind helping you to get up and running with aspnet core 2. As Chris already pointed out though, my branch is a super short term stop gap solution which you dont want to release anything critical on. The only point of difference I would make is that there are many fundamental changes to auth[n/z] in between net core 1 and 2 - so there is a chance that you'd benefit from an aspnet core 2 solution.

@michaeljfarr
Copy link

michaeljfarr commented Oct 24, 2017

There is now a pre-release for Microsoft.AspNetCore.Authentication.WsFederation which is seems good. I had to pick the nightly builds of Microsoft.IdentityModel.Protocols.WsFederation Microsoft.IdentityModel.Tokens as described here AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#739 (comment)

The announcement is here: aspnet/Security#1473

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants