问题描述
我使用 WinHost.com 来托管我的网站.SQL 数据库/会员系统在我的本地计算机上运行良好,但是当上传到服务器时它不起作用.我已正确执行所有步骤.我已经联系了我的服务支持,但已经超过 2 周了,但没有回复.
I am using WinHost.com to host my site. The SQL Database/membership system works perfectly on my local computer, but when uploaded to the server it doesn't work. I've followed all steps correctly. And I have contacted support for my service but it's been over 2weeks and no reply.
当我尝试在我网站的会员页面上登录或注册新用户时,我不断收到此错误.
I keep getting this error when i try to login or register a new user on my membership page on my site.
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(SqlException exception, Boolean breakConnection) +1953274
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4849707
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +204
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +175
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +137
System.Web.Util.SecUtility.CheckSchemaVersion(ProviderBase provider, SqlConnection connection, String[] features, String version, Int32& schemaVersionCheck) +378
System.Web.Security.SqlMembershipProvider.CheckSchemaVersion(SqlConnection connection) +89
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) +815
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) +78
System.Web.UI.WebControls.Login.AuthenticateUsingMembershipProvider(AuthenticateEventArgs e) +60
System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +119
System.Web.UI.WebControls.Login.AttemptLogin() +115
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +101
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +166
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016
谁能告诉我为什么会出现这个错误(显然它找不到东西......),以及我该如何解决它?
Can somebody please tell me why this error has occured (obviously it can't find something...), and how I can fix it?
谢谢大家
贝尔
推荐答案
您是否针对 WinHost.com 的 sql 服务器运行了 aspnet_regsql.exe
?
Did you run aspnet_regsql.exe
against WinHost.com's sql server?
aspnet_regsql.exe -S DBServerName -U DBLogin -P DBPassword -A all -d DBName
如果你不知道在哪里运行上面的命令,那么你可以简单地运行aspnet_regsql.exe"可执行文件.
If you don't know where to run above command then you can simply run 'aspnet_regsql.exe' executable file.
为了找到此文件,请按 Windows 键 + r 打开您的 RUN 命令框,然后在 %windir%\Microsoft.NET\Framework\v4.0.30319
中输入以下命令,然后按 Enter找到aspnet_regsql.exe"文件.它将打开一个向导,您可以按照该向导解决此错误.
In order to locate this file open your RUN Command Box by pressing Windows Key + r and put below command in that %windir%\Microsoft.NET\Framework\v4.0.30319
and Hit enter then find 'aspnet_regsql.exe' file. It will open a wizard that you can follow to resolve this error.
这个错误主要发生在你没有在 asp.net mvc 项目中启用 Roles 在自动创建 aspnet 标识表之前启动.
This error mostly occurs when you didn't enabled Roles in your asp.net mvc project At starting before aspnet identity table automatically created.
您需要确保运行此程序,以便在 WinHost.com 的 SQL 服务器上创建表和对象.
You will need to make sure you run this so that the tables and objects are created on WinHost.com's SQL server.
这篇关于找不到存储过程“dbo.aspnet_CheckSchemaVersion"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!