我正在使用TFS API(Microsoft.TeamFoundation.Client
等)
当我从服务器获取一两件物品时,它可以正常工作(尽管很慢) - 使用
workspace.Get(getRequests, GetOptions.Overwrite Or GetOptions.GetAll)
(其中getRequests
是GetRequest()
)
但是,如果我尝试获取大量项目,请求会在一小时后超时,并出现以下错误:
请与您的管理员联系。联系服务器时出错 技术信息(管理员):
HTTP代码500:内部服务器错误
我无法访问TFS服务器,除非通过网络前端(例如,我不能让我管理它)。
我的问题是:
get
首先这么慢?- 增编 -
当我用workspace.Get(getRequests, GetOptions.Overwrite Or GetOptions.GetAll)
For Each getRequest In getRequests
workspace.Get(getRequest, GetOptions.Overwrite Or GetOptions.GetAll)
Next
时
效果很好;但我不认为这是一种非常有效的方法;如果可以的话,我当然更愿意让其他方法正常工作。
- 附录II-- TFS服务器事件日志具有以下与连接失败一致的事件({x} =模糊信息):
TFS服务中的错误3018 -
TF53010:Team Foundation中发生以下错误 组件或扩展:日期(UTC):11/10/2016 11:36:31机器: {xxxx}应用程序域:{xxxx}程序集: Microsoft.TeamFoundation.Framework.Server,Version = 10.0.0.0, Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a; v2.0.50727服务 主持人:{xxxx}进程详细信息:进程名称:w3wp进程ID:2600 主题ID:8356帐户名称:{xxxx}
详细消息:TF30065:发生了未处理的异常。
Web请求详细信息 网址:http:// {x} /tfs/_tfs_resources/VersionControl/v3.0/repository.asmx [方法:POST] 用户代理:Team Foundation(Myapplication.vshost.exe,11.0.61219.0,其他,SKU:9) 标题:Content-Length = 1034987& Content-Type = application%2fsoap%2bxml%3b + charset%3dutf-8& Accept-Encoding = gzip& Accept-Language = en-GB& Expect = 100-continue& Host = x% 3a8080&安培;用户代理=团队+基金会+(Myapplication.vshost.exe%2C + 11.0.61219.0%2C +其他%2C + SKU%3A9)及X-TFS-版本= 1.0.0.0&安培; X-TFS会话= {会话GUID}%2C +获取&安培;的SOAPAction =%22http%3A%2F%2fschemas.microsoft.com%2fTeamFoundation%2f2005%2f06%2fVersionControl%2fClientServices%2f03%2fGet%22 路径:/tfs/_tfs_resources/VersionControl/v3.0/repository.asmx 本地请求:错误 主机地址:{IPADDRESS} 用户:{MyUSer} [身份验证类型:NTLM]
异常消息:线程正在中止。 (类型 ThreadAbortException)
异常堆栈跟踪:在SNIReadSync(SNI_Conn *,SNI_Packet **, Int32)在SNINativeMethodWrapper.SNIReadSync(SafeHandle pConn, IntPtr的&安培;包,Int32超时)at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult,TdsParserStateObject stateObj)at System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket()at System.Data.SqlClient.TdsParserStateObject.ReadByte()at System.Data.SqlClient.SqlDataReader.HasMoreRows()at System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout)
在 Microsoft.TeamFoundation.Framework.Server.ObjectBinder`1.TryMoveNext() 在 Microsoft.TeamFoundation.VersionControl.Server.CommandGet.ContinueExecution() 在 Microsoft.TeamFoundation.VersionControl.Server.CommandGet.Execute(工作区 工作空间,GetRequest []请求,GetOptions选项,Int32 maxResults,String [] propertyNameFilters)at Microsoft.TeamFoundation.VersionControl.Server.TeamFoundationVersionControlService.Get(TeamFoundationRequestContext requestContext,String workspaceName,String ownerName,GetRequest [] 请求,Int32 maxResults,GetOptions getOptions,String [] propertyNameFilters)at Microsoft.TeamFoundation.VersionControl.Server.RepositoryExtensions.Get(字符串 workspaceName,String ownerName,GetRequest []请求,Int32 maxResults,Int32 options,String [] propertyNameFilters)
错误 - TFSServices中的事件6003
TF53010:Team Foundation中发生以下错误 组件或扩展:日期(UTC):11/10/2016 11:36:31机器:{x} 应用领域:{x}汇编: Microsoft.TeamFoundation.Framework.Server,Version = 10.0.0.0, Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a; v2.0.50727服务 主持人:{x}(团队基金会)流程详情:流程名称:w3wp
进程ID:2600线程ID:8356帐户名:{x}详细消息:TF30065:发生了未处理的异常。
Web请求详细信息 网址:http:// {x} /tfs/_tfs_resources/VersionControl/v3.0/repository.asmx [方法:POST] 用户代理:Team Foundation(Myapplication.vshost.exe,11.0.61219.0,其他,SKU:9) 标题:Content-Length = 1034987& Content-Type = application%2fsoap%2bxml%3b + charset%3dutf-8& Accept-Encoding = gzip& Accept-Language = en-GB& Expect = 100-continue& Host = {x }%3a8080&安培;用户代理=团队+基金会+(Myapplication.vshost.exe%2C + 11.0.61219.0%2C +其他%2C + SKU%3A9)及X-TFS-版本= 1.0.0.0&安培; X-TFS -session = {X}%2C +获取&安培;的SOAPAction =%22http%3A%2F%2fschemas.microsoft.com%2fTeamFoundation%2f2005%2f06%2fVersionControl%2fClientServices%2f03%2fGet%22 路径:/tfs/_tfs_resources/VersionControl/v3.0/repository.asmx 本地请求:错误 主机地址:{x} 用户:{x} [身份验证类型:NTLM]
异常消息:请求超时。 (输入HttpException)
异常堆栈跟踪:
警告 - ASP.NET 4.0.30319.0 - 事件1309
事件代码:3001事件消息:请求已中止。事件 时间:11/10/2016 12:36:31活动时间(UTC):11/10/2016 11:36:31 事件ID:fb85744596804dcca78d5e54037a5dbb事件序列:3事件 发生:2事件详细代码:0申请信息: 应用领域:{x} 信任等级:完整 应用程序虚拟路径:/ tfs 应用程序路径:C:\ Program Files \ Microsoft Team Foundation Server 2010 \ Application Tier \ Web Services \ 机器名称:{x}处理信息: 进程ID:2600 进程名称:w3wp.exe 帐户名称:NT AUTHORITY \ NETWORK SERVICE例外信息: 异常类型:HttpException 异常消息:请求超时。
Request information: Request URL: http://{x}/tfs/_tfs_resources/VersionControl/v3.0/repository.asmx Request path: /tfs/_tfs_resources/VersionControl/v3.0/repository.asmx User host address: {x} User: {x} Is authenticated: True Authentication Type: NTLM Thread account name: NT AUTHORITY\NETWORK SERVICE Thread information: Thread ID: 11 Thread account name: NT AUTHORITY\NETWORK SERVICE Is impersonating: False Stack trace: Custom event details: