Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • John Hodgkinson 613 posts 355 karma points
    May 02, 2014 @ 20:23
    John Hodgkinson
    0

    Umbraco 6.2 release and Custom Membership/Role Providers no longer work

    Just updated our dev environment from Umbraco 6.1.6 to Umbraco 6.2 and now our Custom Membership and Role providers no longer work. Please advise. We just spent about two weeks building this.

    Below is the error info:

    Server Error in '/' Application.

    No membership provider found with name UmbracoMembershipProvider

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidOperationException: No membership provider found with name UmbracoMembershipProvider

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [InvalidOperationException: No membership provider found with name UmbracoMembershipProvider] Umbraco.Core.Security.MembershipProviderExtensions.GetMembersMembershipProvider() +235 Umbraco.Web.Routing.PublishedContentRequestEngine.EnsurePublishedContentAccess() +292 Umbraco.Web.Routing.PublishedContentRequestEngine.HandlePublishedContent() +747 Umbraco.Web.Routing.PublishedContentRequestEngine.FindPublishedContentAndTemplate() +264 Umbraco.Web.Routing.PublishedContentRequestEngine.PrepareRequest() +106 Umbraco.Web.UmbracoModule.ProcessRequest(HttpContextBase httpContext) +513 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18067

  • John Hodgkinson 613 posts 355 karma points
    May 02, 2014 @ 20:49
    John Hodgkinson
    0

    Could someone with the Core/Admin team please elaborate on this in more detail and how we setup custom membership/role providers:

    http://issues.umbraco.org/issue/U4-3886

    http://issues.umbraco.org/issue/U4-4106

    http://issues.umbraco.org/issue/U4-4107

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    May 02, 2014 @ 22:31
    Jan Skovgaard
    0

    Hi John

    Did you buy a license for your Umbraco solution? If so you should be able to get in touch with the HQ guys using ZenDesk where you're guaranteed support (according to the terms of the license you may have bought, which will probably give you a faster answer).

    However...did you have a look at the documentation for the new membership API? http://our.umbraco.org/documentation/Reference/Management-v6/Services/MemberService - When v7.1.1 was released there was made a lot of new stuff regarding members. The same changes have been made for 6.2.0...So perhaps you need to change some API calls in your code?

    If you don't have a confidence or complete license then I think the best way to make the HQ aware of this is by adding an issue to the tracker - there might be a bug and then it should of course be fixed. If there is no bug perhaps you'll get some valuable pointers.

    Hope this helps.

    Cheers, Jan

  • John Hodgkinson 613 posts 355 karma points
    May 02, 2014 @ 22:41
    John Hodgkinson
    0

    Jan - thanks for the help unfortunately, I work for a non-profit and we're not able to do the $4k license at this time. do you know if they offer per incident support?

    I'll take a look at the documentation. I also sent Niels, Shannon and Paul an email to see if they would offer up any tidbits of help but they will probably not since we're not commercial license users (I'll keep my fingers crossed though).

    I'll also submit an issue later this weekend as well.

    As always, thank you for the help and feedback.

    -JH

  • John Hodgkinson 613 posts 355 karma points
    May 03, 2014 @ 01:56
    John Hodgkinson
    0

    Jan - was just looking through the source and I'm hoping I can just modify my existing membership provider to override the new 6.2/7.x Membership provider which I think I modeled after the 6.1.6 providers. thinking I can just override some of these methods:

    https://github.com/umbraco/Umbraco-CMS/blob/6.2.0/src/Umbraco.Web/Security/Providers/MembersMembershipProvider.cs

    https://github.com/umbraco/Umbraco-CMS/blob/61055380c5768be2e30ecb5f5760bf6b818fb153/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs

    and also tie into the Membership helper as well if needed:

    https://github.com/umbraco/Umbraco-CMS/blob/6.2.0/src/Umbraco.Web/Security/MembershipHelper.cs

    we don't need to store member information or accounts in Umbraco since we have over 80k members or so from our external CRM... just need to override the basic Membership Provider and Roles check logic...

    Does this seem along the lines for 6.2? Also wondering if anything special needs to be done in the web.config different than 6.1.6 as well... thx again!

  • Shannon Deminick 1524 posts 5270 karma points MVP 2x
    May 03, 2014 @ 04:18
    Shannon Deminick
    101

    Just like the exception states, it cannot find a membership provider with the name: "UmbracoMembershipProvider" which is what Umbraco requires. The name of this provider is specified in the web.config.

    You've most likely removed the default Umbraco membership provider and added your own to config with your own custom name. You have 2 options:

    • Change your membership provider name in config to be the one that Umbraco expects: UmbracoMembershipProvider
    • Duplicate your membership provider entry in config and make the name of your duplicated entry to be "UmbracoMembershipProvider"
  • John Hodgkinson 613 posts 355 karma points
    May 03, 2014 @ 05:21
    John Hodgkinson
    0

    You're totally awesome Shannon! Thank you! Thank you! Thank you!

    Initially, after I received the error I did try substituting the UmbracoMembershipProvider for my custom provider name but it still did not work so I was freaking and assumed I would have to completely re-do the all the providers from scratch.

    After you confirmed that's all I had to do, I went back in and changed my web.config info again. Still no go, so I went back into my membership and role provider classes and sure enough I had the Application Name also hard coded to my custom provider names. Changed those to the Umbraco defaults(UmbracoMembershipProvider and UmbracoRoleProvider) and BOOM! Back in Business!

    I can't tell you how much I appreciate the help Shannon - you rock! Below are snapshots of what I did change in case anyone is interested...

    enter image description here

    enter image description here

    enter image description here

    enter image description here

  • Bruce 17 posts 82 karma points
    May 21, 2014 @ 11:17
    Bruce
    0

    Just a note for anyone else engaged in custom membership on v7.1.

    I've had a similarish issue but a different error message. Custom Membership Provider, added to Web.Config with a different name and set the defaultProvider to my new provider does not work (similar process worked fine in v4.7). But when I add my custom provider with the same name as the default Umbraco provider "UmbracoMembershipProvider", membership works fine. I'm guessing the default provider attribute is getting ignored.

    Not a big deal put just adding a note here as I've just spent the last hour being very confused by this :)



  • Shannon Deminick 1524 posts 5270 karma points MVP 2x
    May 21, 2014 @ 11:20
    Shannon Deminick
    0

    The reason being is that we didn't want to interfere with a site install that requires a custom default membership provider, if someone set that to be differently from ours then Umbraco would fail whereas this way we just look for a membership provider with the correct name. This doesn't interfere with anything custom that a developer might require.

Please Sign in or register to post replies

Write your reply to:

Draft