C# 在不同计算机上移动项目后,asp.net中的登录控件出现SQL Server连接错误

C# 在不同计算机上移动项目后,asp.net中的登录控件出现SQL Server连接错误,c#,asp.net,entity-framework,forms-authentication,C#,Asp.net,Entity Framework,Forms Authentication,我的asp.net应用程序在我的机器上运行良好。出于测试目的,我将整个项目转移到不同的机器上 现在除了登录,一切都正常了。我能够从数据库加载网站中的数据,所以我相信连接字符串没有问题 我正在对自己的SQL Server数据库(在我的应用程序数据库中有一个单独的表)和EF 4.0使用FormAuthentication 这是错误消息 建立与SQL Server的连接时发生与网络相关或特定于实例的错误。找不到服务器或无法访问服务器。验证实例名称是否正确,以及SQL Server是否配置为允许远程连接

我的asp.net应用程序在我的机器上运行良好。出于测试目的,我将整个项目转移到不同的机器上

现在除了登录,一切都正常了。我能够从数据库加载网站中的数据,所以我相信连接字符串没有问题

我正在对自己的SQL Server数据库(在我的应用程序数据库中有一个单独的表)和EF 4.0使用
FormAuthentication

这是错误消息

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

描述:执行当前web请求期间发生未处理的异常。请查看堆栈跟踪以了解有关错误的更多信息以及错误在代码中的起源

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

源错误:

在执行当前web请求期间生成了未经处理的异常。有关异常的起源和位置的信息可以使用下面的异常堆栈跟踪来识别

堆栈跟踪:

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

System.Data.SqlClient.SqlInternalConnection.OnError(SqlException异常,布尔breakConnection,Action
1 wrapCloseInAction)+5295167
System.Data.SqlClient.TdsParser.throweexception和warning(TdsParserStateObject stateObj,布尔调用连接锁,布尔异步关闭)+242
System.Data.SqlClient.TdsParser.Connect(ServerInfo ServerInfo,sqlinternalconnectionds connHandler,Boolean ignoresnopentimeout,Int64 timerExpire,Boolean encrypt,Boolean trustServerCert,Boolean integratedSecurity,Boolean with failover)+5307115
System.Data.SqlClient.SqlInternalConnectionDS.AttemptOneLogin(ServerInfo ServerInfo、String newPassword、SecureString newSecurePassword、Boolean IgnoresInOpenTimeout、TimeoutTimer timeout、Boolean withFailover)+145
System.Data.SqlClient.SqlInternalConnectionDs.LoginOfAliver(ServerInfo服务器信息、字符串newPassword、SecureString newSecurePassword、Boolean redirectedUserInstance、SqlConnectionString连接选项、SqlCredential凭证、超时)+920
System.Data.SqlClient.SqlInternalConnectionDS.OpenLoginList(超时超时、SqlConnectionString连接选项、SqlCredential凭证、String新密码、SecureString newSecurePassword、Boolean redirectedUserInstance)+307
System.Data.SqlClient.SqlInternalConnectionDS..ctor(DbConnectionPoolIdentity、SqlConnectionString connectionOptions、SqlCredential凭证、对象提供者信息、String newPassword、SecureString newSecurePassword、Boolean redirectedUserInstance、SqlConnectionString userConnectionOptions)+434
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions选项、DbConnectionPoolKey poolKey、Object poolGroupProviderInfo、DbConnectionPool池、DbConnectionOwningConnection、DbConnectionOptions用户选项)+5309659
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool池、DbConnectionOptions选项、DbConnectionPoolKey池键、DbConnectionOptions用户选项)+37
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnectionOptions用户选项)+558
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnectionOptions userOptions)+67
System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection-owningObject,UInt32-waitForMultipleObjectsTimeout,Boolean-allowCreate,Boolean-OnlyoneecheckConnection,DbConnectionOptions-userOptions,DbConnectionInternal&connection)+1052
System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject、TaskCompletionSource
1重试、DbConnectionOptions用户选项、DbConnectionInternal和connection)+78
System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection所有者连接、TaskCompletionSource
1重试、DbConnectionOptions用户选项、DbConnectionInternal和connection)+167
System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection,DbConnectionFactory connectionFactory,TaskCompletionSource
1重试,DbConnectionOptions用户选项)+143
System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1重试)+83
System.Data.SqlClient.SqlConnection.Open()+96
System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext上下文,布尔值还原模拟)+88
System.Web.DataAccess.SqlConnectionHelper.GetConnection(字符串connectionString,布尔值还原模拟)+239
System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(字符串用户名、布尔值updateLastLoginActivityDate、Int32和状态、字符串和密码、Int32和密码格式、字符串和密码盐、Int32和failedPasswordAttemptCount、Int32和failedPasswordAnswerAttemptCount、布尔值和isApproved、DateTime和lastLoginDate、Da