我正在尝试在 asp.net core(2.1) mvc 应用程序中使用以下代码连接 Azure DevOps
Uri orgUrl = new Uri("https://dev.azure.com/xxxxx/");
String personalAccessToken = "xxxxx";
VssConnection connection = new VssConnection(orgUrl, new VssBasicCredential(string.Empty, personalAccessToken));
Run Code Online (Sandbox Code Playgroud)
但是得到这个错误 "VssUnauthorizedException: 'VS30063: You are not authorized to access https://dev.azure.com.'"
相同的代码在 .net 核心控制台应用程序中工作,请有人帮助我吗?