[英]Custom Create User in ASP.net MVC 4
I have made an asp.net MVC 4 Internet application. 我已经做了一个asp.net MVC 4 Internet应用程序。 I wanted to have custom Create User function. 我想拥有自定义的“创建用户”功能。 So I used CreateUser
function of MembershipProvider
class and added <providers>
configuration in my web.config
. 因此,我使用了MembershipProvider
类的CreateUser
函数,并在web.config
添加了<providers>
配置。
But The problem is when I run the code it catches the exception Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion' . 但是问题是当我运行代码时,它捕获了异常找不到存储过程'dbo.aspnet_CheckSchemaVersion' 。 Despite the database is generated by asp.net itself, it deosn't have any stored procedure (as previous versions had). 尽管数据库是由asp.net本身生成的,但它没有任何存储过程(如以前的版本一样)。
I can't use MVC 4's WebSecurity.CreateUserAndAccount
function because it says it is not initialized. 我不能使用MVC 4的WebSecurity.CreateUserAndAccount
函数,因为它表示未初始化。
So I don't know what to do. 所以我不知道该怎么办。 Any Help would be appreciated. 任何帮助,将不胜感激。 Thanks. 谢谢。
First of all, please use new ASP.NET Universal Providers . 首先,请使用新的ASP.NET通用提供程序 。
I wanted to have custom Create User function
exception Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.
SchemaVersions
table anymore. 您将不会在新的ASP.NET Universal Providers中看到该异常,因为它不再使用SchemaVersions
表。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.