1

我正在使用以下代码尝试连接到 Azure DevOps 并检索工作项类型列表,但是我不断收到此异常:

BrowserFlowException:SP324098:您的浏览器无法完成操作

关于这个例外似乎没有太多信息。有谁知道这里发生了什么?我正在使用更新到最新版本机器的 Windows 10 上更新到最新版本的 Visual Studio 2017 企业版。

VssClientCredentials credentials = new VssClientCredentials();

VssClientHttpRequestSettings settings = new VssClientHttpRequestSettings
{
      AllowAutoRedirect = true
};
VssHttpMessageHandler vssHandler = new VssHttpMessageHandler(credentials, settings);
using (VssConnection connection = new VssConnection(this.CollectionUri, credentials, settings))
{
      connection.ConnectAsync().SyncResult();
      // Create instance of WorkItemTrackingHttpClient using VssConnection
      WorkItemTrackingHttpClient witClient = connection.GetClient<WorkItemTrackingHttpClient>();

      var workItemTypes = witClient.GetWorkItemTypesAsync(ProjectName).SyncResult(); ; //exception happens here, I see the login box here too
}
4

0 回答 0