title: Resolve a custom membership provider using unity
body: <p>I have a custom membership provider which works fine until I use unity in the web application. </p>
  
  <pre><code>public class CustomMemberProvider : MembershipProvider
  </code></pre>
  
  <p>I have done some googling and found the snippet below to place in the application_start() of the global file but I am not sure what I need to do to it to make it work for my custom provider. Basically when I make a call on validateUser() on my security controller it fails to resolve the dependencies.</p>
  
  <pre><code>        _container.RegisterType&lt;IFormsAuthenticationService, FormsAuthenticationService&gt;()
          .RegisterType&lt;IMembershipService, AccountMembershipService&gt;()
          .RegisterInstance&lt;MembershipProvider&gt;(Membership.Provider);
  </code></pre>
  
  <p>I thought I could swap "AccountMembershipService" for "CustomMemberProvider" but that causes the Controller Type to be null in the standard "UnityControllerFactory".</p>
  
  <p>Has anyone had the same problems?</p>
  
  <p>thanks.</p>