This project is read-only.

How to use WebSecurity.InitializeDatabaseConnection() in MVC 4.5?

Oct 18, 2012 at 1:37 AM

I'm working on a custom Membership Provider that doesn't use the default AccountController that comes with the VS 2012 MVC 4.5 application, and I can't get the database to initialize.

I've tried using the _AppStart.cshtml file or putting the InitializeDatabaseConnection() method in the Global.asax Application_Start method, and I always get the error, that I must "call the "WebSecurity.InitializeDatabaseConnection" method before you call any other method of the "WebSecurity" class."

Any suggestions on how to make a custom provider work with MVC 4.5?