following some example from Microsoft I created my custom MembershipProvider in my MVC application as
if (MembershipService == null) { MembershipService = new AccountMembershipService(new FcMembershipProvider()); }
and the web.config is configured as
<membership defaultProvider="FcMembershipProvider" userIsOnlineTimeWindow="15">
<providers>
<clear />
<add
name="FcMembershipProvider"
type="Fc.Web.WebAppMVC.Models.FcMembershipProvider"
connectionStringName="ApplicationServices"
enablePasswordRetrieval="true"
enablePasswordReset="true"
applicationName="FcWebMVC"
requiresQuestionAndAnswer="true"
writeExceptionsToEventLog="false" />
</providers>
</membership>
Problem is the Initialize method is not automatically called. any hint?
Thx
I think you need to get hold of your membership provider using the static
Membership.Providerlike so:(I put a cast in there which you may not need depending on what
AccoundMembershipServiceis expecting.) This way ASP .NET’s membership system should initialize it for you.