Reputation: 85
I am facing problem with database connection. As I know if we create new user, using Create UserWizard control and after running it if we refresh the refresh button from solution explorer,aspnetdb.mdf will generated automatically under app directory.But in my case its not happening.I mean aspnetdb.mdf is not generating. Once I submit the sign up submit button getting this error message "Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'. "
Here is my connection string in web.configfile.
<connectionStrings>
<add name="BankingTransaction" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Bank.mdf;integrated security=True;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
Please somebody help me where is my mistake.
Thanks, Masum
Upvotes: 0
Views: 225
Reputation: 1825
The database need the regsql.exe running on it to add all the files the membership .net stuff uses.
This explains how to do it
http://msdn.microsoft.com/en-us/library/ms229862(VS.80).aspx
This installs all the tables and procedures needed for the ASPNET roles and membeship
Upvotes: 1
Reputation: 351758
It sounds like there is a stored procedure you are calling (dbo.aspnet_CheckSchemaVersion
) that does not exist in the database.
Here are some folks who seem to have encountered this same issue:
http://forums.asp.net/t/940632.aspx
http://forums.asp.net/p/1042979/1456396.aspx#1456396 http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataproviders/thread/7a85cf72-7f53-421f-be74-b12262c47f37/
It may be worth trying some of those solutions. This one sounds promising:
Run the following on your SQL SERVER instance:
Exec sp_addrolemember 'aspnet_Membership_FullAccess', 'YourUser'
go
Exec sp_addrolemember 'aspnet_Personalization_FullAccess', 'YourUser'
go
Exec sp_addrolemember 'aspnet_Profile_FullAccess', 'YourUser'
go
Exec sp_addrolemember 'aspnet_Roles_FullAccess', 'YourUser'
go
Exec sp_addrolemember 'aspnet_WebEvent_FullAccess', 'YourUser'
go
Upvotes: 0