Compartilhar via


TFS2008 SP1 + SQL 2008 SP1,生成新团队项目时失败?

英文版本

有客户报告出现以下问题:TFS2008 SP1使用SQL 2008 SP1作为数据库服务器,这种TFS服务器配置在建立新团队项目时失败(通常建立系统中的第一个团队项目时不会失败,问题从第二个团队项目的建立开始)。团队项目建立日志包含下面的详细信息:

2009-12-15 17:54:43Z | Module: Rosetta | Thread: 16 | Entering Initialize in RosettaReportUploader
---begin Exception entry---
Time: 2009-12-15 17:54:43Z
Module: Initializer
Event Description: TF30207: Initialization for plugin "Microsoft.ProjectCreationWizard.Reporting" failed
Exception Type: Microsoft.TeamFoundation.Client.PcwException
Exception Message: TF30224: Failed to retrieve projects from the report server. Please check that the SQL Server Reporting Services Web and Windows services are running and you have sufficient privileges for creating a project.
Stack Trace:
   at Microsoft.VisualStudio.TeamFoundation.RosettaReportUploader.CheckForProjectFolder(PrivateData data, String projectName, ProjectCreationContext context)
   at Microsoft.VisualStudio.TeamFoundation.RosettaReportUploader.Initialize(ProjectCreationContext context)
   at Microsoft.VisualStudio.TeamFoundation.EngineStarter.InitializePlugins(MsfTemplate template, PcwPluginCollection pluginCollection)
--   Inner Exception   --
Exception Type: System.InvalidOperationException
Exception Message: Client found response content type of '', but expected 'text/xml'.
The request failed with an empty response.
Stack Trace:
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at Microsoft.TeamFoundation.Proxy.Reporting.ReportingService.ListChildren(String Item, Boolean Recursive)
   at Microsoft.VisualStudio.TeamFoundation.RosettaReportUploader.CheckForProjectFolder(PrivateData data, String projectName, ProjectCreationContext context)
-- end Inner Exception --
--- end Exception entry ---

这里出现问题的原因是TFS试图调用reporting service的web服务文件ReportService.asmx。可是这个web service URL在SQL Server 2008 SP1中已经废弃了。新的URL是ReportService2005.asmx。 在TFS 数据库服务器管理控制台中,运行以下SQL脚本:

Select url from TfsIntegration.dbo.tbl_service_interface where name=N'ReportsService'

返回的值原本应该是 “https://{path}/ReportService.asmx” 。要解决以上团队项目生成失败的问题,这里您需要将 ReportService.asmx 修改为 ReportService2005.asmx. 可以直接在表中修改,也可以运行一个SQL update 语句。 (注意,不要修改这个值的其他部分,只要在asmx文件中添加2005字样。). 同时,因为这篇文章指出的原因,不要试图使用TFSAdminUtil.exe这个工具来修改这个field。