解决TFS服务器重命名后,无法访问的问题
2013-04-16 17:07 starlet 阅读(1938) 评论(1) 编辑 收藏 举报公司电脑在进入域之前安装的TFS,进入域后,计算机名称统一修改为工号PC-242,这样的后果是TFS无法访问,打开TFS管理控制台,发现数据库连接串还是用的源计算机名称,如下图
找了半天也没找到在哪能修改这个连接串
功夫不负有心人,终于
安装目录\Program Files\Microsoft Team Foundation Server 2010\Application Tier\Web Services\
打开Web.config,修改 key="applicationDatabase" 的Value 为新计算机名称
重新打开TFS管理控制台,一切OK
事件错误如下:
TF53010: Team Foundation 组件或扩展中发生了以下错误: 日期(UTC): 2013/4/16 7:48:33 计算机: PC-242 应用程序域: /LM/W3SVC/8080/ROOT/tfs-1-130105716355752891 程序集: Microsoft.TeamFoundation.Framework.Server, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v2.0.50727 服务主机: 进程详细信息: 进程名称: w3wp 进程 ID: 7224 线程 ID: 4908 帐户名称: NT AUTHORITY\LOCAL SERVICE 详细消息: 应用程序请求处理已开始 Server Version = Microsoft.TeamFoundation.Framework.Server, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Service Account = NT AUTHORITY\LOCAL SERVICE Machine Name = PC-242 异常消息: TF246017: Team Foundation Server 未能连接到数据库。请验证承载数据库的服务器是否正常运行,且没有网络问题阻止与服务器的通信。 (类型 DatabaseConnectionException) 异常堆栈跟踪: 在 Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.TranslateException(Int32 errorNumber, SqlException sqlException, SqlError sqlError) 在 Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.TranslateException(SqlException sqlException) 在 Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.MapException(SqlException ex, QueryExecutionState queryState) 在 Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.HandleException(SqlException ex) 在 Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.Execute(ExecuteType executeType, CommandBehavior behavior) 在 Microsoft.TeamFoundation.Framework.Server.ExtendedAttributeComponent.ReadDatabaseAttribute(String attributeName) 在 Microsoft.TeamFoundation.Framework.Server.DatabaseConnectionValidator.ValidateDatabaseInstanceStamp(String configConnectionString, Guid configInstanceId) 在 Microsoft.TeamFoundation.Framework.Server.DatabaseConnectionValidator.ValidateApplicationConfiguration(String configConnectionString, Guid configInstanceId, List`1 sqlInstances, String analysisInstance, String analysisDatabaseName, Boolean ignoreAnalysisDatasourceUpdateErrors, Boolean autoFixConfiguration, Boolean fullValidation, DatabaseVerificationDatabaseTypes continueOnMissingDatabaseTypes) 在 Microsoft.TeamFoundation.Framework.Server.ApplicationServiceHost..ctor(Guid instanceId, String connectionString, String physicalDirectory, String plugInDirectory, String virtualDirectory, Boolean failOnInvalidConfiguration) 在 Microsoft.TeamFoundation.Framework.Server.TeamFoundationApplication.AttemptStart() 内部异常详细信息: 异常消息: 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: Named Pipes Provider, error: 40 - 无法打开到 SQL Server 的连接) (类型 SqlException) SQL 异常类: 20 SQL 异常编号: 53 SQL 异常过程: SQL 异常行号: 0 SQL 异常服务器: SQL 异常状态: 0 SQL 错误: 异常数据目录: HelpLink.ProdName = Microsoft SQL Server HelpLink.EvtSrc = MSSQLServer HelpLink.EvtID = 53 HelpLink.BaseHelpUrl = http://go.microsoft.com/fwlink HelpLink.LinkId = 20476 异常堆栈跟踪: 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() 在 System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity) 在 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject) 在 System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) 在 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) 在 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) 在 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) 在 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) 在 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) 在 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) 在 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) 在 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) 在 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) 在 System.Data.SqlClient.SqlConnection.Open() 在 Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.Execute(ExecuteType executeType, CommandBehavior behavior) Web 请求详细信息 URL: http://pc-242:8080/tfs/Services/v1.0/Registration.asmx [方法: POST] 用户代理: Team Foundation (devenv.exe, 10.0.40219.1) 标头: Content-Length=402&Content-Type=text%2fxml%3b+charset%3dutf-8&Accept-Encoding=gzip%2cgzip%2cgzip&Accept-Language=zh-CN&Authorization=NTLM+TlRMTVNTUAADAAAAAAAAAFgAAAAAAAAAWAAAAAAAAABYAAAAAAAAAFgAAAAAAAAAWAAAAAAAAABYAAAABcKIogYBsB0AAAAPqLEjZVq%2bIkf6v3mz4AFefA%3d%3d&Expect=100-continue&Host=pc-242%3a8080&User-Agent=Team+Foundation+(devenv.exe%2c+10.0.40219.1)&X-TFS-Version=1.0.0.0&X-TFS-Session=99fbe203-446b-408f-8ec2-d34badc952a4&SOAPAction=%22http%3a%2f%2fschemas.microsoft.com%2fTeamFoundation%2f2005%2f06%2fServices%2fRegistration%2f03%2fGetRegistrationEntries%22 路径: /tfs/Services/v1.0/Registration.asmx 本地请求: True 主机地址: ::1 用户: NEUXA\syp242 [身份验证类型: NTLM]