我四处张望,似乎找不到此错误的答案:
找不到存储过程“ dbo.aspnet_CheckSchemaVersion”。
我正在从一个空的Web项目中编写一个ASP.NET应用程序,并尝试向该应用程序添加角色/成员身份。我自己创建了登录/注销页面,但是我使用的是预制的“登录”工具。我正在使用的数据库是我自己的数据库实例“ Accounts”,该实例使用Windows身份验证。当我处于调试模式时,我可以正常登录!但是当我推送到本地主机时,出现此错误。在显示所有代码/堆栈跟踪/等之前。让我列出到目前为止香港专业教育学院做了什么:
我 HAVE 同时从V4运行aspnet_regsql.exe的多次和V2文件夹只是柜面我错过了什么(因为所有的这个错误,我发现帮助下在V2)
我已经检查了IIS中的应用程序池,将其从“ applicationpoolidentity”切换到“网络服务”,因为在“ applicationpoolidentity”时遇到此错误
System.Data.SqlClient.SqlException:用户“ IIS APPPOOL \ DefaultAppPool”的登录失败。
我尝试重新启动计算机
我尝试卸载/重新安装VS2012和SQL Server 2008 R2
我没有运气就多次操作了web.config
我检查连接字符串
我尝试启动MSSQL服务(我自己的实例和SQLEXPRESS)
我尝试过重新启动IIS中的站点
我没主意了。如此说来,这就是代码/堆栈跟踪/等:
web.config:
<configuration> <connectionStrings> <remove name="AccountsConnectionString"/> <add name="AccountsConnectionString" connectionString="Data Source=development;Initial Catalog=Accounts;Integrated Security=True" providerName="System.Data.SqlClient"/> </connectionStrings> <system.web> <authentication mode="Forms"/> <roleManager enabled="true" defaultProvider="SqlRoleProvider"> <providers> <clear/> <add name="SqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="AccountsConnectionString" /> </providers> </roleManager> <membership defaultProvider="SqlMembershipProvider" userIsOnlineTimeWindow="1500"> <providers> <remove name="SqlMembershipProvider"/> <add name="SqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="AccountsConnectionString" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" applicationName="ConsultDemo" minRequiredNonalphanumericCharacters="0" minRequiredPasswordLength="5"/> </providers> </membership> <profile enabled="true" defaultProvider="SqlProfileProvider"> <providers> <clear/> <add name="SqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="AccountsConnectionString" /> </providers> </profile> <compilation debug="true" targetFramework="4.0"/> </system.web> </configuration>
堆栈跟踪:
[SqlException (0x80131904): Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +388 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +688 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4403 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6665097 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite) +6667096 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) +577 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite) +735 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +290 System.Web.Util.SecUtility.CheckSchemaVersion(ProviderBase provider, SqlConnection connection, String[] features, String version, Int32& schemaVersionCheck) +623 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) +3888825 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +186 System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +195 System.Web.UI.WebControls.Login.AuthenticateUsingMembershipProvider(AuthenticateEventArgs e) +105 System.Web.UI.WebControls.Login.AttemptLogin() +160 System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +93 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +84 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3804
该图显示了架构和存储过程的实际情况:
任何帮助表示赞赏!如果有我可能错过的答案,请指出。我正在尝试使其在localhost上运行…并且没有任何工作!谢谢大家。
请提供UserID和Password您的连接字符串。它不在连接字符串中。
UserID
Password