Question

I'm trying to implement a custom membership provider in my asp.net web app. The problem is that whenever I call the "Roles.AddUserToRole" method it writes to the default membership db built in asp. The strange thing is that when I call the "Membership.CreateUser" method it writes to my custom membership tables. No sure whats going, any help would be much appreciated.

Here a bit of my web.config if this will help:

name="" type="System.Web.Security.SqlMembershipProvider"
        connectionStringName="" 
        enablePasswordRetrieval="false"
        enablePasswordReset="true"
        requiresQuestionAndAnswer="false"
        applicationName=""
        requiresUniqueEmail="true"
        passwordFormat="Hashed"

No correct solution

OTHER TIPS

There are three separate providers:

  • MembershipProvider
  • RoleProvider
  • ProfileProvider

If you want custom behavior for Roles.AddUserToRole you have to make a custom RoleProvider aswell.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top