I have solved the issue. I used the link that I provided in my question and the link that was provided by Kamlesh. The issue was my.. GetRolesForUser. I had to fix this with this code..
public override string[] GetRolesForUser(string username)
{
List<string> allRoles = new List<string>();
var ctx = new PrincipalContext(ContextType.Domain);
UserPrincipal user = UserPrincipal.FindByIdentity(ctx, username);
if (user != null)
{
var groups = user.GetGroups();
allRoles.AddRange(groups.Select(x => x.Name));
}
return allRoles.ToArray();
}
I no longer get a NullReferenceException and this finds the roles that the use is currently in. Make sure that you are using Groups in the active directory as well. Hope this saves someone sometime.