Question

I have made an asp.net MVC 4 Internet application. I wanted to have custom Create User function. So I used CreateUser function of MembershipProvider class and added <providers> configuration in my web.config.

But The problem is when I run the code it catches the exception Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'. Despite the database is generated by asp.net itself, it deosn't have any stored procedure (as previous versions had).

I can't use MVC 4's WebSecurity.CreateUserAndAccount function because it says it is not initialized.

So I don't know what to do. Any Help would be appreciated. Thanks.

Était-ce utile?

La solution

First of all, please use new ASP.NET Universal Providers.

I wanted to have custom Create User function

  • If you want to take care of user authentication and authentication by yourself, you need to implement Custom Membership Provider which basically overrides Default Membership Provider.

exception Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.

  • you will not see that exception in new ASP.NET Universal Providers, because it doesn't use SchemaVersions table anymore.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top