C# ASP.Net错误26定位指定的服务器/实例时出错

C# ASP.Net错误26定位指定的服务器/实例时出错,c#,asp.net,.net,sql-server,entity-framework,C#,Asp.net,.net,Sql Server,Entity Framework,我搞不清楚我做错了什么。我尝试了所有方法:我的连接字符串、关闭防火墙、允许远程连接,但我仍然不断遇到以下错误: 建立与SQL Server的连接时发生与网络相关或特定于实例的错误。找不到服务器或无法访问服务器。验证实例名称是否正确,以及SQL Server是否配置为允许远程连接。(提供程序:SQL网络接口,错误:26-定位指定的服务器/实例时出错) [SqlException(0x80131904):建立与SQL Server的连接时发生网络相关或特定于实例的错误。找不到或无法访问该服务器。请验

我搞不清楚我做错了什么。我尝试了所有方法:我的连接字符串、关闭防火墙、允许远程连接,但我仍然不断遇到以下错误:

建立与SQL Server的连接时发生与网络相关或特定于实例的错误。找不到服务器或无法访问服务器。验证实例名称是否正确,以及SQL Server是否配置为允许远程连接。(提供程序:SQL网络接口,错误:26-定位指定的服务器/实例时出错)

[SqlException(0x80131904):建立与SQL Server的连接时发生网络相关或特定于实例的错误。找不到或无法访问该服务器。请验证实例名称是否正确,以及SQL Server是否配置为允许远程连接。(提供程序:SQL网络接口,错误:26-定位指定的服务器/实例时出错)] System.Data.SqlClient.SqlInternalConnection.OneError(SqlException异常,布尔断开连接,操作
1 wrapCloseInAction)+6568558
System.Data.SqlClient.TdsParser.throweexception和warning(TdsParserStateObject stateObj,布尔调用方连接锁,布尔异步关闭)+717
System.Data.SqlClient.TdsParser.Connect(ServerInfo ServerInfo,sqlinternalconnectionds connHandler,Boolean ignoresnopentimeout,Int64 timerExpire,Boolean encrypt,Boolean trustServerCert,Boolean integratedSecurity,Boolean with failover)+6595000
System.Data.SqlClient.SqlInternalConnectionDS.AttemptOneLogin(ServerInfo ServerInfo、String newPassword、SecureString newSecurePassword、Boolean IgnoresInOpenTimeout、TimeoutTimer timeout、Boolean withFailover)+219
System.Data.SqlClient.sqlinternalconnectionds.loginnofilover(ServerInfo ServerInfo,String newPassword,SecureString newSecurePassword,Boolean redirectedUserInstance,SqlConnectionString connectionOptions,SqlCredential凭证,TimeoutTimer timeout)+6597311
System.Data.SqlClient.SqlInternalConnectionDS.OpenLoginList(超时超时、SqlConnectionString连接选项、SqlCredential凭证、字符串newPassword、SecureString newSecurePassword、布尔重定向EducserInstance)+6597891
System.Data.SqlClient.SqlInternalConnectionDS..ctor(DbConnectionPoolIdentity,SqlConnectionString connectionOptions,SqlCredential凭证,对象提供信息,String newPassword,SecureString newSecurePassword,Boolean RedirectedUserConnectionInstance,SqlConnectionString userConnectionOptions,SessionData reconnectSessionData)+942
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions选项、DbConnectionPoolKey poolKey、Object poolGroupProviderInfo、DbConnectionPool池、DbConnectionOwningConnection、DbConnectionOptions用户选项)+1162
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool池、DbConnectionOwningObject、DbConnectionOptions选项、DbConnectionPoolKey池键、DbConnectionOptions用户选项)+72
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection-owningObject、DbConnectionOptions-userOptions、DbConnectionInternal-oldConnection)+6601145
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject、DbConnectionOptions userOptions、DbConnectionInternal oldConnection)+103
System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection-owningObject,UInt32-waitForMultipleObjectsTimeout,布尔allowCreate,布尔OnlyOnEckConnection,DbConnectionOptions-userOptions,DbConnectionInternal&connection)+2102
System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject、TaskCompletionSource
1重试、DbConnectionOptions用户选项、DbConnectionInternal和connection)+116 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection-owningConnection,TaskCompletionSource
1重试,DbConnectionOptions-userOptions,DbConnectionInternal-oldConnection,DbConnectionInternal&connection)+1079
System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection,DbConnectionFactory connectionFactory,TaskCompletionSource
1重试,DbConnectionOptions用户选项)+6605639 System.Data.SqlClient.SqlConnection.tryopeniner(TaskCompletionSource
1重试)+233
System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource
1重试)+278 System.Data.SqlClient.SqlConnection.Open()+239 System.Data.Entity.Infrastructure.InternalDispatcher
1.Dispatch(t目标目标,操作
2操作,TInterceptionContext拦截上下文,操作3执行,操作3执行)+207 System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection-connection,DbInterceptionContext-interceptionContext)+438 System.Data.Entity.SqlServer.c__DisplayClass33.b__32()+582 System.Data.Entity.SqlServer.c__DisplayClass1.b__0()+15 System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Func
1操作)+263
System.Data.Entity.SqlServer.SqlProviderServices.UsingMasterConnection(DbConnection-sqlConnection,Action
1act)+749 System.Data.Entity.SqlServer.SqlProviderServices.DbCreateDatabase(DbConnection连接,null
1命令超时,StoreItemCollection StoreItemCollection)+314
System.Data.Entity.Migrations.Utilities.DatabaseCreator.Create(DbConnection)+329
System.Data.Entity.Migrations.Dbmigator.EnsureDatabaseExists(操作必须成功访问数据库)+230
System.Data.Entity.Internal.DatabaseCreator.CreateDatabase(InternalContext InternalContext,Func
3 createMigrator,ObjectContext ObjectContext)+130 System.Data.Entity.Database.Create(DatabaseExistenceState)+267 System.Data.Entity.CreateDatabaseIfNotExists
1.InitializeDatabase(TCont