title: Is there a WCF service to sit on top of ASPNET Membership and provide login/create user functionality?
body: <p>I need a WCF service to sit on top of ASPNET membership and allow me to call all the methods of ASPNET membership such as <code>validateUser</code>, <code>createUser</code> etc.</p>
  
  <p>I need this becasue I have out-of-firewall apps that need to access a single central ASPNET membership database. If they were all inside the firewall I'd just point the connectionstring to the database and be done.</p>
  
  <p>Microsoft provides this service :
  <a href="http://msdn.microsoft.com/en-us/library/bb386582.aspx" rel="nofollow noreferrer">WCF Authentication Service</a></p>
  
  <p>When I saw this I thought 'great - thats just what  I need'. Then I looked at the interface :</p>
  
  <pre><code>public interface AuthenticationService {
  
      bool ValidateUser(string username, string password, string customCredential);
      bool Login(string username, string password, string customCredential, bool isPersistent);
      bool IsLoggedIn();
      void Logout();
  }
  </code></pre>
  
  <p>Uh oh! No 'CreateUser' etc.</p>
  
  <p>I found a Codeproject which basically does what I want : <a href="http://www.codeproject.com/KB/aspnet/WSSecurityProvider.aspx" rel="nofollow noreferrer">Custom MembershipProvider and RoleProvider Implementations that use Web Services</a>. The problem is it is ASMX and I need WFC. It is also a tremendous amount of code and I don't know how well it is tested.</p>
  
  <p>I'm thinking I may have to just create my own service to do this - but I'm sure there must be an existing example of this out there. I just haven't found it yet. I'm slightly weary of writing it myself because there are always catches when it comes to security and I  don't want to miss anything.</p>
  
  <p>Fortunately I'm using the <code>IMembershipService</code> interface in ASP.NET MVC so I can pretty easily slot in whatever I want to. Is my own service the easiest way ?</p>