關於自定義RoleProvider和MembershipProvider的問題?
我用了CreateUserWizard的ContentTemplate來實現自定義用戶注冊,重寫了
MyRole,MyMemberShip,分別派生於RoleProvider,MembershipProvider,
DATABASE為自己新建的,有個Users table,我點畿CreateUserWizard里的注冊,出錯Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion '.不知怎么解決,我web.config如下:
<membership defaultProvider= "AspNetSqlServer2005Provider " userIsOnlineTimeWindow= "15 " hashAlgorithmType= " ">
<providers>
<clear/>
<add connectionStringName= "sqlconn " enablePasswordRetrieval= "false " enablePasswordReset= "true " requiresQuestionAndAnswer= "false " applicationName= "/ "
requiresUniqueEmail= "true " passwordFormat= "Hashed " maxInvalidPasswordAttempts= "5 " minRequiredPasswordLength= "7 " minRequiredNonalphanumericCharacters= "0 "
passwordAttemptWindow= "10 " passwordStrengthRegularExpression= " " name= "AspNetSqlServer2005Provider " type= "System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a "/>
</providers>
</membership>
<authentication mode= "Forms ">
<forms loginUrl= "Default.aspx " name= ".aspxDefault "> </forms>
</authentication>
[解决办法]
CreateUserWizard.MembershipProvider?
看你的出错信息,还是用的默认的那个MembershipProvider,设置一下所用的MembershipProvider,不论是控件异或web.config
保佑你自定义的MembershipProvider可用
[解决办法]
type= "System.Web.Security.SqlMembershipProvider
---------------
这哪里是你自定义的...还是默认的...