Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Alex Lazar 5 posts 25 karma points
    Jul 01, 2011 @ 18:37
    Alex Lazar
    0

    Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.

    I have 2 applications:

    - a presentation Umbraco web site;

    - an administration Web Forms application.

    Each one has it's own database.

     

    I want to use a unique membership system on both so I copied the membership and role provider settings from the admin web.config to the Umbraco web.config.

     

    I placed an ASP.NET Login control on the Umbraco website and tried to log in. When logging in I get the following error: (What could I be doing wrong and what is the best way to use a unique membership system for both applications?)

     

    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) +404
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +412
       System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1363
       System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6312253
       System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +6313986
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +538
       System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +689
       System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +327
       System.Web.Util.SecUtility.CheckSchemaVersion(ProviderBase provider, SqlConnection connection, String[] features, String version, Int32& schemaVersionCheck) +612
       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) +3665527
       System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +189
       System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +202
       System.Web.UI.WebControls.Login.AuthenticateUsingMembershipProvider(AuthenticateEventArgs e) +225
       System.Web.UI.WebControls.Login.AttemptLogin() +166
       System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +93
       System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +52
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3691

  • Lesley 284 posts 143 karma points
    Jul 02, 2011 @ 01:02
    Lesley
    0

    Hi Alex,

    It looks as though the provider is trying to use the Umbraco database, rather than the one with your membership.

    You'll need to add a connection string in the Umbraco web.config to your membership database and set the connectionStringName property of your provider to use that.

    So something like:

     

    <connectionStrings>
        ...
        <add name="MembershipConn" connectionString=.......
    </connectionStrings> 
    ...
    <membership defaultProvider="MembershipProv" userIsOnlineTimeWindow="15">
        ...
        <providers>
            <add name="MembershipProv" connectionStringName="MembershipConn" type="yourProvider"
              ...other settings... />
        </providers>
    </membership>
    If you're still having problems, please post the relevant sections of your web.config as that will help a lot.
    Cheers,
    Lesley

     

  • Alex Lazar 5 posts 25 karma points
    Jul 02, 2011 @ 08:54
    Alex Lazar
    0

    Hi Lesley,

     

    Yup, that was it! I had created a new connection string in web.config, but I had written the Umbraco database in it.

     

    Thank you very much for the hint!

Please Sign in or register to post replies

Write your reply to:

Draft