tugberkugurlu / AspNetCore.Identity.MongoDB

MongoDB Data Store Adaptor for ASP.NET Core Identity
MIT License
230 stars 69 forks source link

Update to asp core 1.1 #46

Closed dacanizares closed 7 years ago

dacanizares commented 7 years ago

I'm getting errors when I try to update the sample project to use it on the recently released stable version of VS2017 with asp core 1.1.

tugberkugurlu commented 7 years ago

What are the errors and what did you try to do?

dacanizares commented 7 years ago

I'm modifying the default project that VS2017 creates and I'm getting errors with this line in startup.cs:

services.TryAddSingleton<IUserClaimsPrincipalFactory, UserClaimsPrincipalFactory>();

It says that UserClaimsPrincipalFactory requires 2 arguments. It also can't found AddDefaultTokenProviders a couple of lines after.

tugberkugurlu commented 7 years ago

I'm modifying the default project that VS2017 creates and I'm getting errors with this line in startup.cs:

services.TryAddSingleton<IUserClaimsPrincipalFactory, UserClaimsPrincipalFactory>();

That probably because you don't have this in: https://github.com/tugberkugurlu/AspNetCore.Identity.MongoDB/blob/c3c91067332852b63fdfad5fd3254dba6ec2800e/samples/IdentitySample.Mvc/Startup.cs#L171-L229

tugberkugurlu commented 7 years ago

It also can't found AddDefaultTokenProviders a couple of lines after.

Same as before, it comes from https://github.com/tugberkugurlu/AspNetCore.Identity.MongoDB/blob/c3c91067332852b63fdfad5fd3254dba6ec2800e/samples/IdentitySample.Mvc/Startup.cs#L151-L159

dacanizares commented 7 years ago

Thanks! Sorry, I haven't seen that before. It worked perfectly.