大家好, 我是剛接觸ASP.NET的新手, 最近遇到一個很麻煩的問題, 困擾好久了.
因為要使用登陸註冊等功能, 我在網頁裡使用了membership,provider等.
網頁在本機測試的時候, 已經在connectionstring裡面指向了服務器的database, 而且本地測試一切順利.
但是當將網頁文件放到服務器上後, 只要使用 VS 2008提供的login registration等控件就會出現以下錯誤:
(這個是login時出現的錯誤)
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) +212
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +245
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2811
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +2476460
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +2478113
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +424
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +522
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +182
System.Web.Util.SecUtility.CheckSchemaVersion(ProviderBase provider, SqlConnection connection, String[] features, String version, Int32& schemaVersionCheck) +621
System.Web.Security.SqlRoleProvider.CheckSchemaVersion(SqlConnection connection) +89
System.Web.Security.SqlRoleProvider.GetRolesForUser(String username) +1223
System.Web.Security.RolePrincipal.IsInRole(String role) +242
System.Web.Configuration.AuthorizationRule.IsTheUserInAnyRole(StringCollection roles, IPrincipal principal) +229
System.Web.Configuration.AuthorizationRule.IsUserAllowed(IPrincipal user, String verb) +354
System.Web.Configuration.AuthorizationRuleCollection.IsUserAllowed(IPrincipal user, String verb) +245
System.Web.Security.UrlAuthorizationModule.OnEnter(Object source, EventArgs eventArgs) +11146952
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171
|
我通過 SQL Server Management Studio檢查到的確有dbo.aspnet_CheckSchemaVersion 這個stored procedures存在.
也已經無數次運行過 aspnet_regsql.(我在本地測試時連的服務器上的database, 應該可以確定database的存在吧?)
請教一下可有解決方法呢?
謝謝各位,不勝感激!