Troubleshooting "Could Not Find Stored Procedure 'dbo.aspnet_CheckSchemaVersion' Error
When hosting your application with WinHost.com, you may encounter the error message: "Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'." This error occurs when the SQL database on the server lacks the necessary stored procedures for membership management.
Solution:
To resolve this issue, follow these steps:
Run aspnet_regsql.exe:
This command creates the necessary tables and objects in the SQL database. Run the following command in the command prompt:
aspnet_regsql.exe -S [DBServerName] -U [DBLogin] -P [DBPassword] -A all -d [DBName]
Replace the placeholder values with your server name, database login name, password, and database name. If you're unsure where to find aspnet_regsql.exe, navigate to:
%windir%\Microsoft.NET\Framework\v4.0.30319
and locate the file.
Follow the Wizard:
The command will launch a wizard that will guide you through the creation process. Ensure that the "Membership" and "Roles" features are selected during the wizard setup.
Enable Roles:
If you have disabled roles in your ASP.NET MVC project before creating the identity tables, you may need to enable them now.
By completing these steps, the membership tables and stored procedures will be created in the SQL database on WinHost.com, resolving the "Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'" error.
The above is the detailed content of How to Fix the 'Could Not Find Stored Procedure 'dbo.aspnet_CheckSchemaVersion'' Error on WinHost?. For more information, please follow other related articles on the PHP Chinese website!