Hi there & thanks for your amazing work :)
I ran into an issue after upgrading asp.net core rc2 -> 1.0.0. yesterday:
When loading my dev-app, the line
services.AddOpenIddict<Core.Entities.User, DataAccess.ApoNextDbContext>).DisableHttpsRequirement();
causes
An exception of type 'System.TypeLoadException' occurred in OpenIddict.dll but was not handled in user code
Additional information: Der Typ "Microsoft.Extensions.DependencyInjection.Extensions.ServiceCollectionExtensions" in der Assembly "Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60" konnte nicht geladen werden.
(translates as 'Type ... in assebly .. could not be loaded')
I am using Openiddict 1.0.0-alpha2-0331 . Everything was running fine with asp.net core RC2 & OpenIddict alpha 302.
Let me know if you need additional information!
Mo
Hi there & thanks for your amazing work :)
Haha, thanks :smile:
The issue you're seeing is unfortunately a known one, caused by class name changes in the logging stack (and in a few other places): https://github.com/aspnet/DependencyInjection/issues/411
This incompatibility will be fixed when migrating to the RTM bits. In the meantime, I'd recommend using the ASP.NET Core RC2 packages :clap:
Alright! Thanks for your quick response. Keep up the good work!
Not to push but any idea when a new package that targets the RTM bits will be available? I can't upgrade to RTM until it is so just want to plan accordingly.
Not to push but any idea when a new package that targets the RTM bits will be available?
In the next few days. Actually, I already have a working "OpenIddict for ASP.NET Core RTM" prototype, but I'd like to share it with a few testers before releasing it publicly.
For those who want to try the experimental "OpenIddict for RTM" bits, you can download the corresponding packages here: https://ci.appveyor.com/project/openiddict/openiddict-core/build/1.0.0-alpha2-337/artifacts
Thanks for the upload!
I get a new error now on Startup
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(dir)
.UseIISIntegration()
.UseStartup<Startup>()
.Build();
throws:
An unhandled exception of type 'System.TypeLoadException' occurred in mscorlib.dll
Additional information: Der Typ "Microsoft.AspNetCore.DataProtection.DataProtectionExtensions" in der Assembly "Microsoft.AspNetCore.DataProtection.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60" konnte nicht geladen werden.
But that might not be Openiddict related at all... ?
UPDATE: Seems to be a problem with: AspNet.Security.OAuth.Validation, I'll post it over there !
Update 2: Using a proper version of AspNet.Security.OAuth.Validation (1.0.0-alpha3-0181) fixed the issue. My bad, sorry!
Update 2: Using a proper version of AspNet.Security.OAuth.Validation (1.0.0-alpha3-0181) fixed the issue. My bad, sorry!
I'd recommend using 1.0.0-alpha2-final. It was published yesterday on MyGet and will be pushed soon on NuGet.org.
I stuck in a rabbit hole. Hopefully, someone here can point me in the right direction. I'm trying to upgrade to the RTM from RC2 and having many issues related to AspNet.Security.OpenIdConnect.Server. Everything compiles, but it won't run. I was able to install ASOS 1.0.0-beta6-0839 but then I started getting issues with Microsoft.IdentityModel.Tokens. Any help or pointers are greatly appreciated.
@PinpointTownes
I'm all new to OpenIddict and when creating my first project in Core 1.0.0, I encountered the same issue @MoxxNull has seen. The link to the alpha2-337 nuget artifacts, how do I incorporate them into my project (total newb here).
@moraleslos the way I did it was:
I did the same as @jaredcnance
@jaredcnance So what am I suppose to change in the project.json file? I already downloaded those files in a folder called C:TempOpenIddict and my nuget.config now looks like this:
<packageSources>
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
<add key="aspnet-contrib" value="https://www.myget.org/F/aspnet-contrib/api/v3/index.json" />
<add key="TempOpenIddict" value="C:\TempOpenIddict" />
</packageSources>
@moraleslos change project.json to:
"dependencies": {
...
"OpenIddict": "1.0.0-alpha2-*"
...
}
thanks @jaredcnance that was it!
Getting a new error now which looks a bit different:
System.IO.FileLoadException: Could not load file or assembly 'Microsoft.IdentityModel.Protocols, Version=2.0.0.699, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'Microsoft.IdentityModel.Protocols, Version=2.0.0.699, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerMiddleware..ctor(RequestDelegate next, ILoggerFactory loggerFactory, UrlEncoder encoder, IOptions`1 options)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Extensions.Internal.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
at Microsoft.Extensions.Internal.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass3_0.b__0(RequestDelegate next)
at Microsoft.AspNetCore.Builder.Internal.ApplicationBuilder.Build()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
@jjennings you're using a pretty old version of ASOS. The latest OpenIddict bits will require 1.0.0-beta6-final.
FYI, the "OpenIddict for RTM" packages are now on MyGet.org