U4-3519 - ActiveDirectoryMembershipProvider not working

Created by Matt Bettesworth 14 Nov 2013, 01:28:50 Updated by Shannon Deminick 20 Dec 2013, 01:38:33

I can't get the ActiveDirectoryMembershipProvider to work with either the front end or back end.

Wired up as I used to in 4.7. I've even tried writing my own that overrides the ValidateUser method, with no luck.

In the back-end, once the provider gives a positive response to ValidateUser, the WebAPI service seems to respond with an 'object not set to an instance of an object' error. The JSON object returned by the API is: {"Message":"An error has occurred.","ExceptionMessage":"Object reference not set to an instance of an object.","ExceptionType":"System.NullReferenceException","StackTrace":" at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.b__c(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)"}

If I implement the provider for members, the back-end breaks with a similar error when entering the Members app. The stack trace for this is: at Umbraco.Web.Trees.LegacyTreeController..ctor(XmlTreeNode xmlTreeNode, String treeAlias, String currentSection, UrlHelper urlHelper) at Umbraco.Web.Trees.ApplicationTreeExtensions.TryGetRootNodeFromLegacyTree(ApplicationTree appTree, FormDataCollection formCollection, UrlHelper urlHelper, String currentSection) at Umbraco.Web.Trees.ApplicationTreeController.GetRootForMultipleAppTree(ApplicationTree configTree, FormDataCollection queryStrings) at Umbraco.Web.Trees.ApplicationTreeController.GetApplicationTrees(String application, String tree, FormDataCollection queryStrings) at lambda_method(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.b__c(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments) at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)

Thanks

Comments

Shannon Deminick 14 Nov 2013, 08:50:37

Currently the member tree/editor doesn't support non-umbraco membership providers, pretty sure we had a task for that but can't find it atm.


Shannon Deminick 14 Nov 2013, 08:53:19

@Matt - what are you trying to do here? Implement ActiveDirectoryMembership for admins and/or members ? You say it's not working on the front end, can you elaborate?

Currently AD support for administration isn't supported: U4-2915 and non umbraco membership providers are yet working with the new editors in the members area, but we haven't really changed anything on the front-end.


Matt Bettesworth 18 Nov 2013, 05:37:40

@Shannon - Thanks for your response.

I'm trying to implement AD for both. Appreciate you letting me know it doesn't work on the back-end. At least I can give trying this a rest for now...

As for the front-end, I think I may have been getting myself in knots because I was seeing different things at the back-end where before this was the easy bit.

Managed to get all working with v6. Back-end is good as you say and managed to get the front-end working with a custom AD Membership and Role provider.

Thanks again, Matt


Shannon Deminick 18 Nov 2013, 06:10:42

I've just fixed up custom membership providers in the back end, just newing up a VM with AD on it to test/fix/implement the rest of AD integration.


Priority: Normal

Type: Bug

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.0.0

Due in version: 7.0.0, 6.2.0

Sprint:

Story Points:

Cycle: