PDA

View Full Version : I am so close to getting a login object on page on the beta site to work


easyrealtya
05-08-2005, 01:41 AM
I am a Newbie and never programmed befor a week ago so please understand http://community.discountasp.net/emoticons/smurf.gif

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:






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(SqlExc eption exception, Boolean breakConnection) +786178
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection) +684790
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj) +207
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1751
System.Data.SqlClient.SqlCommand.FinishExecuteRead er(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +107
System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(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.InternalExecuteNo nQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +415
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135
System.Web.Util.SecUtility.CheckSchemaVersion(Prov iderBase provider, SqlConnection connection, String[] features, String version, Int32& schemaVersionCheck) +387
System.Web.Security.SqlMembershipProvider.CheckSch emaVersion(SqlConnection connection) +85
System.Web.Security.SqlMembershipProvider.GetPassw ordWithFormat(String username, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved) +815
System.Web.Security.SqlMembershipProvider.CheckPas sword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +80
System.Web.Security.SqlMembershipProvider.CheckPas sword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42
System.Web.Security.SqlMembershipProvider.Validate User(String username, String password) +78
System.Web.UI.WebControls.Login.OnAuthenticate(Aut henticateEventArgs e) +161
System.Web.UI.WebControls.Login.AttemptLogin() +94
System.Web.UI.WebControls.Login.OnBubbleEvent(Obje ct source, EventArgs e) +101
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(Command EventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +134
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection 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(SqlExc eption exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteRead er(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(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.InternalExecuteNo nQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at System.Web.Util.SecUtility.CheckSchemaVersion(Prov iderBase provider, SqlConnection connection, String[] features, String version, Int32& schemaVersionCheck)
at System.Web.Security.SqlMembershipProvider.CheckSch emaVersion(SqlConnection connection)
at System.Web.Security.SqlMembershipProvider.GetPassw ordWithFormat(String username, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved)
at System.Web.Security.SqlMembershipProvider.CheckPas sword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat)
at System.Web.Security.SqlMembershipProvider.CheckPas sword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved)
at System.Web.Security.SqlMembershipProvider.Validate User(String username, String password)
at System.Web.UI.WebControls.Login.OnAuthenticate(Aut henticateEventArgs e)
at System.Web.UI.WebControls.Login.AttemptLogin()
at System.Web.UI.WebControls.Login.OnBubbleEvent(Obje ct source, EventArgs e)
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at System.Web.UI.WebControls.Button.OnCommand(Command EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection 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.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep 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.-->

bruce
05-09-2005, 08:52 AM
i believe the database has to be pre-populated with the membership schema.

Bruce

DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)

Danny
05-09-2005, 09:28 AM
Can you post the login for

http://beta-146070.server1.dotnetsandbox.net/login.aspx?ReturnUrl=%2fDefault.aspx

so we can replicate your error?

easyrealtya
05-10-2005, 12:07 AM
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.

easyrealtya
05-10-2005, 11:14 AM
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.

jym
06-03-2005, 02:28 AM
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.ProcessInheritsAttrib ute(String baseTypeName, String src, Assembly assembly)
at System.Web.UI.TemplateParser.PostProcessMainDirect iveAttributes(IDictionary parseData)
[Exception]: Could not load type 'login'.
at System.Web.UI.TemplateParser.ProcessException(Exce ption ex)
at System.Web.UI.TemplateParser.PostProcessMainDirect iveAttributes(IDictionary parseData)
at System.Web.UI.PageParser.PostProcessMainDirectiveA ttributes(IDictionary parseData)
at System.Web.UI.TemplateParser.ProcessMainDirective( IDictionary mainDirective)
at System.Web.UI.TemplateControlParser.ProcessMainDir ective(IDictionary mainDirective)
at System.Web.UI.PageParser.ProcessMainDirective(IDic tionary mainDirective)
at System.Web.UI.TemplateParser.ProcessDirective(Stri ng directiveName, IDictionary directive)
at System.Web.UI.BaseTemplateParser.ProcessDirective( String directiveName, IDictionary directive)
at System.Web.UI.TemplateControlParser.ProcessDirecti ve(String directiveName, IDictionary directive)
at System.Web.UI.PageParser.ProcessDirective(String directiveName, IDictionary directive)
at System.Web.UI.TemplateParser.ParseStringInternal(S tring text)
[Exception]: Could not load type 'login'.
at System.Web.UI.TemplateParser.ProcessException(Exce ption ex)
at System.Web.UI.TemplateParser.ParseStringInternal(S tring 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.g et_CodeCompilerType()
at System.Web.Compilation.BuildProvider.GetCompilerTy peFromBuildProvider(BuildProvider buildProvider)
at System.Web.Compilation.BuildProvidersCompiler.Proc essBuildProviders()
at System.Web.Compilation.BuildProvidersCompiler.Perf ormBuild()
at System.Web.Compilation.BuildManager.CompileWebFile (String virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildR esultInternal(String virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildR esultWithNoAssert(HttpContext context, String virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.UI.PageHandlerFactory.GetHandler(HttpCo ntext context, String requestType, String virtualPath, String path)
at System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String requestType, String path, String pathTranslated, Boolean useAppConfig)
at System.Web.MapHandlerExecutionStep.System.Web.Http Application.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously)
-->

easyrealtya
06-03-2005, 04:15 AM
I got by this a long timr time ago