Reputation: 12323
Has this method been deprecated? Can't find any info in any docs.
This is where I originally found the code:
http://blog.osbornm.com/2010/07/21/using-simplemembership-with-asp.net-webpages/
//Set up Simple Membership
WebSecurity.InitializeDatabaseFile(“SecurityDemo.sdf”, “Users”, “UserID”, “Username”, true);
Looks to me it has been replaced with this method?
http://msdn.microsoft.com/en-us/library/gg569134(v=vs.111).aspx
Are these the exact same methods with just a name change?
Upvotes: 1
Views: 760
Reputation: 17540
Yes, InitializeDatabaseFile has been depreciated for InitializeDatabaseConnection. The main difference is that depreciated method took the database name (in this example an MS SQL Server Compact Edition database), whereas the new method takes the name of the connection string for your database that is defined in the web.config. And it is not limited to the Compact Edition. You can learn more about initializing SimpleMembership in this article on customizing and seeding SimpleMembership.
Upvotes: 2