jay*_*t55 84 sql sql-server stored-procedures
我正在使用WinHost.com来托管我的网站.SQL数据库/成员资格系统在我的本地计算机上运行良好,但上传到服务器时它不起作用.我已经正确地遵循了所有步骤.我已经联系了我的服务支持,但已经超过2周,没有回复.
当我尝试在我的网站上的会员页面上登录或注册新用户时,我一直收到此错误.
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
Run Code Online (Sandbox Code Playgroud)
有人可以告诉我为什么会出现这个错误(显然它找不到东西......),以及我如何解决它?
谢谢你们
巴尔
Gab*_*ams 160
你是否aspnet_regsql.exe
针对WinHost.com的sql server 运行?
aspnet_regsql.exe -S DBServerName -U DBLogin -P DBPassword -A all -d DBName
Run Code Online (Sandbox Code Playgroud)
如果您不知道上面的命令在哪里运行,那么您只需运行'aspnet_regsql.exe'可执行文件.
要找到此文件,请按Windows键+ r打开您的RUN命令框并在其中%windir%\Microsoft.NET\Framework\v4.0.30319
输入以下命令并按Enter键然后找到'aspnet_regsql.exe'文件.它将打开一个向导,您可以按照该向导来解决此错误.
当您在asp.net mvc项目中未启用角色时,通常会在aspnet身份表自动创建之前启动时发生此错误.
您需要确保运行此命令,以便在WinHost.com的SQL服务器上创建表和对象.
Nit*_*ant 28
从开始菜单的Visual Studio工具文件夹中打开visual studio命令提示符并键入
aspnet_regsql
并按照向导为asp.net成员资格和角色提供程序注册数据库.
Nae*_*raz 10
我以前见过这个.您使用的数据库没有成员资格,角色管理和配置文件功能所需的数据库元素.所以你有几个选择:
我有同样的问题 - 从SQL Object manager
Visual Studio中复制/粘贴connectionString 并忘记键入Initial Catalog=YourDatabaseName
.