The Problem
When you create an asp.net mvc application by Visual studio 2010, by default the application services in the web.config is configured to use SqlExpress or some default instance. Now when you replace the connection string and try to use the actual connection that doesn't have the membership provider stored procs. One situation could be when you try to invoke them by applying [Authorize] attribute in your controller module and navigate to the Registration page, you will get the below error:
Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.
When you create an asp.net mvc application by Visual studio 2010, by default the application services in the web.config is configured to use SqlExpress or some default instance. Now when you replace the connection string and try to use the actual connection that doesn't have the membership provider stored procs. One situation could be when you try to invoke them by applying [Authorize] attribute in your controller module and navigate to the Registration page, you will get the below error:
Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.
Source Error:
Exception Details: System.Data.SqlClient.SqlException: Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.
Source Error:
|
The Solution:
You could resolve it by running aspnet_regsql.exe and follow the wizard directions to configure the relevant Database for your MVC application.
You could also run the below commandline:
aspnet_regsql.exe -S DBServerName -U DBLogin -P DBPassword -A all -d DBName
No comments:
Post a Comment