I am trying to use SimpleMembership with my own database that already has all the users/roles/etc...
To that end, I change the WebSecurity.InitializeDatabaseConnection
line in the SimpleMembershipInitializer
constructor to point to my own table (note autoCreateTables: true
):
WebSecurity.InitializeDatabaseConnection("NameOfMyConnectionString", "User",
"UserId", "DomainLogin", autoCreateTables: true);
I then created my own provider where I overrode the 'ValidateUser' method.
At this point, I fired up the app, logged in and then logged out (that is all that's required for my app - account creation is elsewhere). I looked at my database and the following tables were created: webpages_Membership, webpages_OAuthMembership, webpages_Roles, webpages_UsersInRoles. However, there was nothing in the tables. I fired up the Profiler, repeated the operation and in no way were those tables ever being referenced.
So am I safe changing the autoCreateTables
parameter from true
to false
?
P.S. Yes, I read this question, but it did not answer my specific question.