ABP Data Migration Time error!

Source: Internet
Author: User

System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or could not be accessed. Verify that the instance name is correct, and that SQL Server is configured to allow remote connections. (Provider:sql Network Interfaces, error:26-Error locating the specified server/instance)
In System.Data.SqlClient.SqlInternalConnectionTds. ctor (dbconnectionpoolidentity identity, sqlConnectionString connectionoptions, sqlcredential credential, Object Providerinfo, String newpassword, SecureString Newsecurepassword, Boolean redirecteduserinstance, sqlConnectionString Userconnectionoptions, Sessiondata reconnectsessiondata, Dbconnectionpool pool, String Accesstoken, Boolean applytransientfaulthandling)
In System.Data.SqlClient.SqlConnectionFactory.CreateConnection (dbconnectionoptions options, Dbconnectionpoolkey Poolkey, Object poolgroupproviderinfo, Dbconnectionpool pool, DbConnection owningconnection, dbconnectionoptions Useroptions)
At System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection (Dbconnectionpool pool, DbConnection Owningobject, dbconnectionoptions options, Dbconnectionpoolkey Poolkey, Dbconnectionoptions userOptions)
In System.Data.ProviderBase.DbConnectionPool.CreateObject (DbConnection owningobject, dbconnectionoptions Useroptions, dbconnectioninternal oldconnection)
In System.Data.ProviderBase.DbConnectionPool.UserCreateRequest (DbConnection owningobject, dbconnectionoptions Useroptions, dbconnectioninternal oldconnection)
In System.Data.ProviderBase.DbConnectionPool.TryGetConnection (DbConnection owningobject, UInt32 Waitformultipleobjectstimeout, Boolean allowcreate, Boolean onlyonecheckconnection, Dbconnectionoptions userOptions, dbconnectioninternal& connection)
In System.Data.ProviderBase.DbConnectionPool.TryGetConnection (DbConnection owningobject, TaskCompletionSource ' 1 Retry, dbconnectionoptions useroptions, dbconnectioninternal& connection)
In System.Data.ProviderBase.DbConnectionFactory.TryGetConnection (DbConnection owningconnection, TaskCompletionSource ' 1 retry, dbconnectionoptions useroptions, Dbconnectioninternal oldconnection, dbconnectioninternal& connection)
In System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal (DbConnection outerconnection, Dbconnectionfactory connectionfactory, TaskCompletionSource ' 1 retry, dbconnectionoptions userOptions)
In System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection (DbConnection outerconnection, dbconnectionfactory ConnectionFactory, TaskCompletionSource ' 1 retry, dbconnectionoptions useroptions)
In System.Data.SqlClient.SqlConnection.TryOpenInner (TaskCompletionSource ' 1 retry)
In System.Data.SqlClient.SqlConnection.TryOpen (TaskCompletionSource ' 1 retry)
In System.Data.SqlClient.SqlConnection.Open ()
In system.data.entity.infrastructure.interception.dbconnectiondispatcher.<open>b__36 (DbConnection T, Dbconnectioninterceptioncontext c)
In System.Data.Entity.Infrastructure.Interception.InternalDispatcher ' 1.dispatch[ttarget,tinterceptioncontext] ( Ttarget target, action ' 2 operation, Tinterceptioncontext Interceptioncontext, action ' 3 Executing, action ' 3 executed)
In System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open (DbConnection connection, Dbinterceptioncontext Interceptioncontext)
In System.data.entity.sqlserver.sqlproviderservices.<>c__displayclass33.<usingconnection>b__32 ()
In System.data.entity.sqlserver.defaultsqlexecutionstrategy.<>c__displayclass1.<execute>b__0 ()
In System.data.entity.sqlserver.defaultsqlexecutionstrategy.execute[tresult] (Func ' 1 operation)
In System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute (Action operation)
In System.Data.Entity.SqlServer.SqlProviderServices.UsingConnection (DbConnection sqlConnection, Action ' 1 act)
In System.Data.Entity.SqlServer.SqlProviderServices.UsingMasterConnection (DbConnection sqlConnection, Action ' 1 act)
In System.Data.Entity.SqlServer.SqlProviderServices.CreateDatabaseFromScript (Nullable ' 1 commandtimeout, DbConnection sqlConnection, String createdatabasescript)
In System.Data.Entity.SqlServer.SqlProviderServices.DbCreateDatabase (DbConnection connection, Nullable ' 1 CommandTimeout, storeItemCollection storeitemcollection)
In System.Data.Entity.Core.Common.DbProviderServices.CreateDatabase (DbConnection connection, Nullable ' 1 CommandTimeout, storeItemCollection storeitemcollection)
In System.Data.Entity.Core.Objects.ObjectContext.CreateDatabase ()
In System.Data.Entity.Migrations.Utilities.DatabaseCreator.Create (DbConnection connection)
In System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists (Action mustsucceedtokeepdatabase)
In the System.Data.Entity.Migrations.Infrastructure.MigratorBase.EnsureDatabaseExists (Action Mustsucceedtokeepdatabase)
In System.Data.Entity.Migrations.DbMigrator.Update (String targetmigration)
In System.Data.Entity.Migrations.Infrastructure.MigratorBase.Update (String targetmigration)
In System.Data.Entity.Migrations.Design.ToolingFacade.UpdateRunner.Run ()
In System.AppDomain.DoCallBack (CrossAppDomainDelegate callbackdelegate)
In System.AppDomain.DoCallBack (CrossAppDomainDelegate callbackdelegate)
In System.Data.Entity.Migrations.Design.ToolingFacade.Run (Baserunner runner)
In System.Data.Entity.Migrations.Design.ToolingFacade.Update (String targetmigration, Boolean Force)
In System.data.entity.migrations.updatedatabasecommand.<>c__displayclass2.<.ctor>b__0 ()
In System.Data.Entity.Migrations.MigrationsDomainCommand.Execute (Action command)
clientconnectionid:00000000-0000-0000-0000-000000000000
Error number:-1,state:0,class:20
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or could not be accessed. Verify that the instance name is correct, and that SQL Server is configured to allow remote connections. (Provider:sql Network Interfaces, error:26-Error locating the specified server/instance)
Pm> Update-database
Specify the '-verbose ' flag to view the SQL statements being applied to the target database.
System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or could not be accessed. Verify that the instance name is correct, and that SQL Server is configured to allow remote connections. (Provider:sql Network Interfaces, error:26-Error locating the specified server/instance)
In System.Data.SqlClient.SqlInternalConnectionTds. ctor (dbconnectionpoolidentity identity, sqlConnectionString connectionoptions, sqlcredential credential, Object Providerinfo, String newpassword, SecureString Newsecurepassword, Boolean redirecteduserinstance, sqlConnectionString Userconnectionoptions, Sessiondata reconnectsessiondata, Dbconnectionpool pool, String Accesstoken, Boolean applytransientfaulthandling)
In System.Data.SqlClient.SqlConnectionFactory.CreateConnection (dbconnectionoptions options, Dbconnectionpoolkey Poolkey, Object poolgroupproviderinfo, Dbconnectionpool pool, DbConnection owningconnection, dbconnectionoptions Useroptions)
At System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection (Dbconnectionpool pool, DbConnection Owningobject, dbconnectionoptions options, Dbconnectionpoolkey Poolkey, Dbconnectionoptions userOptions)
In System.Data.ProviderBase.DbConnectionPool.CreateObject (DbConnection owningobject, dbconnectionoptions Useroptions, dbconnectioninternal oldconnection)
In System.Data.ProviderBase.DbConnectionPool.UserCreateRequest (DbConnection owningobject, dbconnectionoptions Useroptions, dbconnectioninternal oldconnection)
In System.Data.ProviderBase.DbConnectionPool.TryGetConnection (DbConnection owningobject, UInt32 Waitformultipleobjectstimeout, Boolean allowcreate, Boolean onlyonecheckconnection, Dbconnectionoptions userOptions, dbconnectioninternal& connection)
In System.Data.ProviderBase.DbConnectionPool.TryGetConnection (DbConnection owningobject, TaskCompletionSource ' 1 Retry, dbconnectionoptions useroptions, dbconnectioninternal& connection)
In System.Data.ProviderBase.DbConnectionFactory.TryGetConnection (DbConnection owningconnection, TaskCompletionSource ' 1 retry, dbconnectionoptions useroptions, Dbconnectioninternal oldconnection, dbconnectioninternal& connection)
In System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal (DbConnection outerconnection, Dbconnectionfactory connectionfactory, TaskCompletionSource ' 1 retry, dbconnectionoptions userOptions)
In System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection (DbConnection outerconnection, dbconnectionfactory ConnectionFactory, TaskCompletionSource ' 1 retry, dbconnectionoptions useroptions)
In System.Data.SqlClient.SqlConnection.TryOpenInner (TaskCompletionSource ' 1 retry)
In System.Data.SqlClient.SqlConnection.TryOpen (TaskCompletionSource ' 1 retry)
In System.Data.SqlClient.SqlConnection.Open ()
In system.data.entity.infrastructure.interception.dbconnectiondispatcher.<open>b__36 (DbConnection T, Dbconnectioninterceptioncontext c)
In System.Data.Entity.Infrastructure.Interception.InternalDispatcher ' 1.dispatch[ttarget,tinterceptioncontext] ( Ttarget target, action ' 2 operation, Tinterceptioncontext Interceptioncontext, action ' 3 Executing, action ' 3 executed)
In System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open (DbConnection connection, Dbinterceptioncontext Interceptioncontext)
In System.data.entity.sqlserver.sqlproviderservices.<>c__displayclass33.<usingconnection>b__32 ()
In System.data.entity.sqlserver.defaultsqlexecutionstrategy.<>c__displayclass1.<execute>b__0 ()
In System.data.entity.sqlserver.defaultsqlexecutionstrategy.execute[tresult] (Func ' 1 operation)
In System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute (Action operation)
In System.Data.Entity.SqlServer.SqlProviderServices.UsingConnection (DbConnection sqlConnection, Action ' 1 act)
In System.Data.Entity.SqlServer.SqlProviderServices.UsingMasterConnection (DbConnection sqlConnection, Action ' 1 act)
In System.Data.Entity.SqlServer.SqlProviderServices.CreateDatabaseFromScript (Nullable ' 1 commandtimeout, DbConnection sqlConnection, String createdatabasescript)
In System.Data.Entity.SqlServer.SqlProviderServices.DbCreateDatabase (DbConnection connection, Nullable ' 1 CommandTimeout, storeItemCollection storeitemcollection)
In System.Data.Entity.Core.Common.DbProviderServices.CreateDatabase (DbConnection connection, Nullable ' 1 CommandTimeout, storeItemCollection storeitemcollection)
In System.Data.Entity.Core.Objects.ObjectContext.CreateDatabase ()
In System.Data.Entity.Migrations.Utilities.DatabaseCreator.Create (DbConnection connection)
In System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists (Action mustsucceedtokeepdatabase)
In the System.Data.Entity.Migrations.Infrastructure.MigratorBase.EnsureDatabaseExists (Action Mustsucceedtokeepdatabase)
In System.Data.Entity.Migrations.DbMigrator.Update (String targetmigration)
In System.Data.Entity.Migrations.Infrastructure.MigratorBase.Update (String targetmigration)
In System.Data.Entity.Migrations.Design.ToolingFacade.UpdateRunner.Run ()
In System.AppDomain.DoCallBack (CrossAppDomainDelegate callbackdelegate)
In System.AppDomain.DoCallBack (CrossAppDomainDelegate callbackdelegate)
In System.Data.Entity.Migrations.Design.ToolingFacade.Run (Baserunner runner)
In System.Data.Entity.Migrations.Design.ToolingFacade.Update (String targetmigration, Boolean Force)
In System.data.entity.migrations.updatedatabasecommand.<>c__displayclass2.<.ctor>b__0 ()
In System.Data.Entity.Migrations.MigrationsDomainCommand.Execute (Action command)
clientconnectionid:00000000-0000-0000-0000-000000000000
Error number:-1,state:0,class:20
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or could not be accessed. Verify that the instance name is correct, and that SQL Server is configured to allow remote connections. (Provider:sql Network Interfaces, error:26-Error locating the specified server/instance)

Workaround: The reason is that the startup project is not set, as long as the Web project is set to be a startup item

ABP Data Migration Time error!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.