Custom Membership Provider: aspnet_CheckSchemaVersion?

G

Guest

Hi,

I am revamping my company's website with ASP.Net 2.0. In order to use our
existing user data in our SQL 2000, I have written a custom membership
provider. However, when I try to logon with the Login control, it gives an
error:
System.Data.SqlClient.SqlException: Could not find stored procedure
'dbo.aspnet_CheckSchemaVersion'.

Is it because I have not run the aspnet_regsql.exe yet? Do I have to?

I took reference from the following two Microsoft articles and they didn't
mention about the aspnet_regsql.exe anyway.

http://msdn2.microsoft.com/en-us/library(d=printer)/system.web.security.membership.aspx
http://msdn2.microsoft.com/en-us/library(d=printer)/yh26yfzy.aspx

Any comments?


YWB.
 
G

Guest

I am assuming that since you wrote your own provider that you are connecting
to your own database tables rather than the membership tables in the
SQLMembershipProvider database. When you use the login controls it assumes
that you are going to that database unless you tell it otherwise. The error
you are getting shows that it's trying to access the SQLMembershipProvider
database which has not been created. You only run aspnet_regsql.exe if you
want to use the built-in database. Check out this post at the ASP.NET Forums
for instructions on wiring up a custom membership provider

http://forums.asp.net/1112968/ShowPost.aspx
 
G

Guest

Hi Rick,

Yes, you're right. I didn't set the type attribute correctly in the <add>
tag under <provider> in the web.config file. After changing it to the
namespace of my membership provider, it's working fine now.

Thanks!


YWB.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top