I am so close to getting a login object on page on the beta site to work

Discussion in 'ASP.NET 2.0' started by easyrealtya, May 8, 2005.

  1. I am a Newbie and never programmed befor a week ago so please understand [​IMG]

    I have no problem connecting a datagrid to my database on my addon account on asp.net.
    You can see that at http://beta-146070.server1.dotnetsandbox.net/login.aspx?ReturnUrl=%2fDefault.aspxI putthe datagridunder my LOGIN control just to prove I canconnect to the DB on my addon from the beta site.

    However my login object on my login.aspx pagejust wont do it even with the correct connection string for the default membership provider in the Web.config.
    My login object works fine here but not on the beta site.
    My questions ...No matter what I do with that login object is it a fact that as far as that login object is concerned,its need to connect to a sql database, no matter where it (sql db)resides, without SQLExpress I am screwed.
    Here is my error as I modified my web.config to custom web eror mode='off'
    Now I see the error as seen next.... I am a Newbie and never programmed befor a week ago so please understand;)

    Server Error in '/' Application.


    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:






    Code:
    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:






    Code:
    [SqlException (0x80131904): Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.]
       System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +786178
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +684790
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +207
       System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1751
       System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +107
       System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +570
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +134
       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) +387
       System.Web.Security.SqlMembershipProvider.CheckSchemaVersion(SqlConnection connection) +85
       System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved) +815
       System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +80
       System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42
       System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +78
       System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +161
       System.Web.UI.WebControls.Login.AttemptLogin() +94
       System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +101
       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) +134
       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) +5670
    




    Version Information:Microsoft .NET Framework Version:2.0.50215.44; ASP.NET Version:2.0.50215.44




    Is this error due to there being no SQL Express or do you think I still have an issue with my syntax of my web.config? The web.config follows. ..






    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">








    <connectionStrings>


    <add name="DB_146070ConnectionString" connectionString=";Initial Catalog=DB_146070;User ID=??????;Password=???????"


    providerName="System.Data.SqlClient" />


    <add name="DB_146070ConnectionString2" connectionString="Data Source=mssql05.discountasp.net;Initial Catalog=DB_146070;User ID=????????;Password=?????????"


    providerName="System.Data.SqlClient" />


    </connectionStrings>


    <system.web>





    <customErrors mode="Off"/>


    <authentication mode="Forms">


    </authentication>





    <membership defaultProvider="DB_146070ConnectionString2" >


    <providers>





    <add name="DB_146070ConnectionString2" type="System.Web.Security.SqlMembershipProvider" connectionStringName="DB_146070ConnectionString2" applicationName="MyApplication" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" requiresUniqueEmail="true" passwordFormat="Hashed"/>


    </providers>


    </membership>


    </system.web>


    </configuration>





    I keep the two connection strings in for switching back and forth to my local.<!--
    [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, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved)
    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.ProcessRequest(HttpContext context)
    at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    --><!--
    This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    i believe the database has to be pre-populated with the membership schema.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. I copied all the stored procedures from the aspnetdb database in the database on the addon server


    Now the checkversion schema is there and ok and now i get this error



    Server Error in '/' Application.


    The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_reqsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.


    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.Configuration.Provider.ProviderException: The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_reqsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.
     
  4. The login is user= q and the password is Qazqaz1!
    The error is that the 'dbo.aspnet_CheckSchemaVersion'. not found. The stored procedure is there in the databaseI looked.
     
  5. jym

    jym

    The problem is a DotNetFramework version.


    If I use VBExpress Beta2, it runs with Microsoft .NET Framework Version:2.0.50215.44; ASP.NET Version:2.0.50215.44 and I get the same error as U.


    If I use Microsoft .NET Framework Version:2.0.40607.42; ASP.NET Version:2.0.40607.42 , I dont get the error anymore but got other errors<!--
    [HttpException]: Could not load type 'login'.
    at System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throwOnError)
    at System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String src, Assembly assembly)
    at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData)
    [Exception]: Could not load type 'login'.
    at System.Web.UI.TemplateParser.ProcessException(Exception ex)
    at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData)
    at System.Web.UI.PageParser.PostProcessMainDirectiveAttributes(IDictionary parseData)
    at System.Web.UI.TemplateParser.ProcessMainDirective(IDictionary mainDirective)
    at System.Web.UI.TemplateControlParser.ProcessMainDirective(IDictionary mainDirective)
    at System.Web.UI.PageParser.ProcessMainDirective(IDictionary mainDirective)
    at System.Web.UI.TemplateParser.ProcessDirective(String directiveName, IDictionary directive)
    at System.Web.UI.BaseTemplateParser.ProcessDirective(String directiveName, IDictionary directive)
    at System.Web.UI.TemplateControlParser.ProcessDirective(String directiveName, IDictionary directive)
    at System.Web.UI.PageParser.ProcessDirective(String directiveName, IDictionary directive)
    at System.Web.UI.TemplateParser.ParseStringInternal(String text)
    [Exception]: Could not load type 'login'.
    at System.Web.UI.TemplateParser.ProcessException(Exception ex)
    at System.Web.UI.TemplateParser.ParseStringInternal(String text)
    at System.Web.UI.TemplateParser.ParseString(String text, String virtualPath)
    [HttpParseException]: Could not load type 'login'.
    at System.Web.UI.TemplateParser.ParseString(String text, String virtualPath)
    at System.Web.UI.TemplateParser.ParseFile(String physicalPath, String virtualPath)
    at System.Web.UI.TemplateParser.ParseInternal()
    at System.Web.UI.TemplateParser.Parse()
    at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType()
    at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider)
    at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()
    at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
    at System.Web.Compilation.BuildManager.CompileWebFile(String virtualPath)
    at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(String virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
    at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, String virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
    at System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path)
    at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, String path, String pathTranslated, Boolean useAppConfig)
    at System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    -->
     
  6. I got by this a long timr time ago
     

Share This Page