Hi,
I’ve been going around in circles and I’ve hit a brick wall.
I have a successful working OIDC test app (see TESTING.OIDCWINFORM.cs attached). I only manually add the IdentityModel.OIdcClient Nuget but it has dependencies:
IdentityModel.5.2.0
IdentityModel.OidcClient.5.2.1
Microsoft.Bcl.AsyncInterfaces.6.0.0
Microsoft.Extensions.DependencyInjection.6.0.0
Microsoft.Extensions.DependencyInjection.Abstractions.6.0.0
Microsoft.Extensions.Logging.6.0.0
Microsoft.Extensions.Logging.Abstractions.6.0.0
Microsoft.Extensions.Options.6.0.0
Microsoft.Extensions.Primitives.6.0.0
System.Buffers.4.5.1
System.Diagnostics.DiagnosticSource.6.0.0
System.Memory.4.5.4
System.Numerics.Vectors.4.5.0
System.Runtime.CompilerServices.Unsafe.6.0.0
System.Text.Encodings.Web.5.0.1
System.Text.Json.5.0.2
System.Threading.Tasks.Extensions.4.5.4
System.ValueTuple.4.5.0
When I transplant the code into a wiseJ project (with a few changes for example the webBrowser control – also attached as TESTING.WJWEBCORE.cs) I can run the project but an odd error is thrown which prevents the authentication process:
Could not load file or assembly ‘System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The located assembly’s manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040)
I’ve tried to remove this module (defaults to 6.0.0) and install an older version (and manually referencing) but this seems to break the IdentityModel.Oidcclient and it reports errors saying that it can’t contact the IDP (which I know is correctly entered and online as the Winform app confirms).
Do you have any idea what this conflict is?
Hi Alex,
Attached is a sample for using OpenID in .NET 4.8 with Wisej.NET.
HTH,
Alaa
Please login first to submit.