Copied to clipboard

Flag this post as spam?

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


  • Corey Sherman 55 posts 127 karma points
    Oct 09, 2012 @ 23:01
    Corey Sherman
    0

    Sharing Umbraco Members on another Website

    I am working for a company that has an existing Umbraco site that has a lof of members already using the Umbraco Membership Provider.  This same company has another site in the making that will have the same members and the company would like to maintain members in one location.  We considered using the who "two sites under one Umbraco Instance" setup, but the existing site is already pretty clunky and slow due to some complexity to that site, so combining them would only make things worse.  Is there another way to have two sites using the same Members database?

  • Richard Terris 273 posts 715 karma points
    Oct 10, 2012 @ 11:54
    Richard Terris
    0

    I think unless you want to share the same database by having two sites under one install, then you'll have to write a stored procedure in Site 2 to access the users table in Site 1

    Not terribly difficult to do I don't think but it's the only way I could think of

  • Thomas 49 posts 78 karma points c-trib
    Oct 12, 2012 @ 16:50
    Thomas
    0

    One easy option might be to place the two sites on the same subdomain (e.g. umbracosite1.yourdomain.com and umbracosite2.yourdomain.com), and then configure your formsauthentication settings in the web.config to set the cookie path to yourdomain.com. This will allow you to redirect all login/logut over to the existing login functionality in the "old" site, but retain the authentication cookie in the new.

    If that's not an options, you can access the members in any Umbraco installation via a webservice.
    If you look at the existing Umbraco installation then it has an Members API that expose various methods over a webservice located in the root here: /umbraco/webservices/api/MemberService.asmx

    You could reference that from your new Umbraco instance, and then use standard ASP.NET forms authentications. As part of the login authentication you can perform a check against the webservice in the existing (old) Umbraco site (readByLogin), and from the return value (null for unauthenticated) you can place details into sessions etc.It would also be able to register new members via the service, and update existing.

    If you need more functionality you could possible expose your own webservice in the existing Umbraco instance, and under the hood use the Umbraco membership API (http://our.umbraco.org/wiki/reference/api-cheatsheet/working-with-members) to perform whatever you need. 

Please Sign in or register to post replies

Write your reply to:

Draft