This project has moved and is read-only. For the latest updates, please go here.
4
Vote

Support for ASPNET 5.0 and Core Framework

description

Get ready for ASPNET 5.0 and VS 2015

file attachments

comments

wrote Apr 22, 2015 at 11:35 PM

Associated with changeset 34446: Very, very unstable. Much more testing and clean up to go. Still need to convert tests to xunit. Basic login seems to work but hit and miss.

wrote May 6, 2015 at 1:43 AM

Associated with changeset 34649: First crack at .net45 and dnx frameworks building and running side by side. xunit tests running on all frameworks. Not all tests are passing on the dnx side need to investigate. For the most part dnx seems to be working good. Major rework of the unit tests to support all frameworks. Don't even bother unless you are running VS 2015 RC or higher.

wrote Jun 2, 2015 at 10:24 PM

wrote Dec 27, 2015 at 9:42 AM

Associated with changeset 36480: Cleaning up for RC1 Update1 asp.net 5 and identity framework releases.

wrote Dec 28, 2015 at 8:51 AM

Associated with changeset 36481: Adding RC1 sample mvc project and a helper method for first time setup. Cleanup to the service model.

wrote Dec 28, 2015 at 6:57 PM

Associated with changeset 36482: Release notes and description changes only.

wrote Mar 22, 2016 at 12:03 PM

wrote Mar 22, 2016 at 3:47 PM

gerardtoconnor wrote Mar 22, 2016 at 3:47 PM

Hi dotnetdavy, really great work on library, thank you for all your great work, I tried to run your MVCbeta2 code and am getting an error when I try to register user.

NullReferenceException: Object reference not set to an instance of an object.
ElCamino.AspNet.Identity.AzureTable.UserStore`7.GetUserIdAsync(TUser user, CancellationToken cancellationToken)

I am not too familiar with the new DI in asp.net 5 but seems that perhaps IdentityCloudContext has not been initialized inside of the UserStore? if you need any help on code/testing please do let me know, are you aware of this issue already?

dotnetdavy wrote Mar 22, 2016 at 4:20 PM

@gerardtoconnor take a look at the sample ASP.NET 5 project at https://identityazuretable.codeplex.com/SourceControl/latest#Releases/2.x.x.x/sample/Sample-Beta2/ with special attention to https://identityazuretable.codeplex.com/SourceControl/latest#Releases/2.x.x.x/sample/Sample-Beta2/Startup.cs -> ConfigureServices and https://identityazuretable.codeplex.com/SourceControl/latest#Releases/2.x.x.x/sample/Sample-Beta2/appsettings.json IdentityAzureTable section. Also, insure you are running the dnx RC1-Update1 in your project framework settings.
Hope this helps.
-Dave

gerardtoconnor wrote Mar 22, 2016 at 7:44 PM

Thank you Dave for getting back to me, It was the Sample-Beta2 project that I had in fact been testing and was getting that issue on, I had updated the appsettings.json and included a live storage account and was failing on the GetUserIdAsync() call every time.

I subsequently went into the source and updated the GetUserIdAsync function and now it works perfectly. I found that on the user register/create there was a call to the GetUserIdAsync being made before the GenerateKeys method was run to populate the Id on the user in CreateAsync(), The null reference exception was on the Id field. By inserting a null check on the Id field, and running your GenerateKeys method when null, it fixed the problem and now everything seems to be working great! I'm not sure if you want to update the source to double check Id as per my update but it should not impact performance and would help anyone else with this issue going forward. Thanks again for your help.
public virtual Task<string> GetUserIdAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            ThrowIfDisposed();
            if (user == null)
            {
                throw new ArgumentNullException("user");
            }
            
            if (user.Id == null)
            {
                ((Model.IGenerateKeys)user).GenerateKeys();
            }

            return Task.FromResult(user.Id.ToString());
        }

erikst wrote Apr 7, 2016 at 8:27 PM

Hello,

I am running into the same problem using my local development storage. It looks like GetUserIdAsync is called before the user is actually created and can't handle a Id being null.

I solved it for now to do this in my code:
var user = new ApplicationUser { UserName = model.Email, Email = model.Email };
user.GenerateKeys();
var result = await _userManager.CreateAsync(user, model.Password);

wrote Apr 8, 2016 at 12:01 AM

wrote Jun 21, 2016 at 1:51 AM

Associated with changeset 36794: RC2 support and many, many project fixes. 100% test pass for net45 and core(standard).

wrote Jun 25, 2016 at 11:28 PM

Associated with changeset 36800: Improved user lookup performance by batching user ids using controlled threadpools. Added some units tests for GetUsersByClaim and GetUserByRole.

wrote Jul 12, 2016 at 8:52 AM

Associated with changeset 36830: Updating xunit paths and splitting the aspnet core work into a seperate assembly following the final namespace for aspnetcore.identity.

wrote Jul 12, 2016 at 9:36 AM

Associated with changeset 36831: More renaming for aspnetCore

wrote Jul 12, 2016 at 10:29 AM

Associated with changeset 36832: More aspnetCore renaming.

wrote Jul 13, 2016 at 5:07 AM

Associated with changeset 36835: Adding sample project for aspnet core. Also setting release versioning and github project info.

wrote Jul 13, 2016 at 5:20 AM

Associated with changeset 36836: Fixing the sampe solution. Removing the direct project reference.

wrote Jul 13, 2016 at 5:57 AM

Associated with changeset 36837: Updating sample project references.

wrote Jul 13, 2016 at 6:36 AM

Associated with changeset 36838: Sample core cleanup. Removing all sql tooling references.

wrote Nov 30 at 10:11 AM