locked
Could not find stored procedure dbo.aspnet_CheckSchemaVersion RRS feed

  • Question

  • User-2007397001 posted

    Ok, I've seen plenty of posts about this but not one of them could help me.

    I've been running a site with no problems and with the hosting company discountasp.net I only have 1 MS SQL 2005 database.

    So, I merged my aspnetdb DB into my own database using the usual method aspnet_regsql.exe.

    All went well, I got all the relevant tables into my database so I went about changing the web.config:-

    I added this:- 

     <connectionStrings>
    <remove name="LocalSqlServer" />
    <add name="LocalSqlServer" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\UKSD.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
    </connectionStrings>

    My membership providers didn't change - but here it is anyway:-

     <membership>

          <providers>

    <remove name="AspNetSqlMembershipProvider"/>

    <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="true" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="5" passwordStrengthRegularExpression="" /> </providers>

    </membership>
    So, to my knowledge, I made the necessary changes but I now get the error when running in local mode.  I haven't tried on the host yet, but I need it working locally first.

    Here is the debug info:-

    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:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [SqlException (0x80131904): Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.]
    System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +857450
    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735062
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
    System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +149
    System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +886
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
    System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +415
    System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135
    System.Web.Util.SecUtility.CheckSchemaVersion(ProviderBase provider, SqlConnection connection, String[] features, String version, Int32& schemaVersionCheck) +367
    System.Web.Security.SqlMembershipProvider.CheckSchemaVersion(SqlConnection connection) +85
    System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121
    System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105
    System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42
    System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83
    System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160
    System.Web.UI.WebControls.Login.AttemptLogin() +105
    System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99
    System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
    System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102


    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
    <!-- [SqlException]: Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at System.Web.Util.SecUtility.CheckSchemaVersion(ProviderBase provider, SqlConnection connection, String[] features, String version, Int32& schemaVersionCheck) at System.Web.Security.SqlMembershipProvider.CheckSchemaVersion(SqlConnection connection) at System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) at System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) at System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) at System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) at System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) at System.Web.UI.WebControls.Login.AttemptLogin() at System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown. at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.default_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -->

    Tuesday, November 7, 2006 5:31 PM

Answers

  • User-2007397001 posted

    Forgot to say, yes it was working and works fine if I use the same connection string but attach the normal aspnetdb database.
     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 8, 2006 4:41 PM

All replies

  • User1873438307 posted

    Either that procedure does not exist or the sp does not have the dbo permissions.

    Was it working fine before? 

    Wednesday, November 8, 2006 7:25 AM
  • User461001010 posted

    check the connection strings in your sqldatasources

    Wednesday, November 8, 2006 9:19 AM
  • User-2007397001 posted
    The procedures are all there - I can only put it down to permissions - but I don't know what to check against?  Can you tell me what to check and where??
    Wednesday, November 8, 2006 4:39 PM
  • User-2007397001 posted

    Forgot to say, yes it was working and works fine if I use the same connection string but attach the normal aspnetdb database.
     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 8, 2006 4:41 PM
  • User-2007397001 posted
    Now sorted it - but had to take drastic actions - I copied my private tables into the ASPNETDB and renamed the database.  I guess it was an acccess issue but trying to find it was a total nightmare.
    Thursday, November 9, 2006 3:39 PM
  • User-909656897 posted

    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

    Monday, March 12, 2007 7:35 AM