I started a new internet project with VS2012 and am trying to just restructure my project a bit and I can't seem to keep the SimpleMemberhsipProvider working. Basically, all I've done is move the models objects into a core project along with a couple other items. I've implemented Ninject and am trying to abstract Entity a bit by using a repository pattern to get my data. I really don't feel as though I've changed much with the current project, but for some reason when I start the application now I get:
{"The Role Manager feature has not been enabled."}
The ActionFilter that is supplied by the framework is where the error is thrown when:
WebSecurity.InitializeDatabaseConnection("DefaultConnection", "UserProfile", "Id", "UserName", autoCreateTables: true);
is called.
Here is some of the stacktrace:
[ProviderException: The Role Manager feature has not been enabled.]
System.Web.Security.Roles.EnsureEnabled() +9561885
System.Web.Security.Roles.get_Provider() +8
WebMatrix.WebData.WebSecurity.InitializeProviders(DatabaseConnectionInfo connect, String userTableName, String userIdColumn, String userNameColumn, Boolean autoCreateTables) +104
WebMatrix.WebData.WebSecurity.InitializeDatabaseConnection(String connectionStringName, String userTableName, String userIdColumn, String userNameColumn, Boolean autoCreateTables) +100
InoutBoard.Core.Infrastructure.Filters.SimpleMembershipInitializer..ctor() in c:UsersKyleDocumentsVisual Studio 2012ProjectsInoutBoardInoutBoard.CoreInfrastructureFiltersInitializeSimpleMembershipAttribute.cs:42[InvalidOperationException: The ASP.NET Simple Membership database could not be initialized. For more information, please see http://go.microsoft.com/fwlink/?LinkId=256588]
InoutBoard.Core.Infrastructure.Filters.SimpleMembershipInitializer..ctor() in c:UsersKyleDocumentsVisual Studio 2012ProjectsInoutBoardInoutBoard.CoreInfrastructureFiltersInitializeSimpleMembershipAttribute.cs:46
I'm hosting the code on github at the following link https://github.com/keroger2k/InoutBoard
See Question&Answers more detail:os