0
我知道备用凭据(Authenticating to hosted TFS: TF30063: You are not authorized to access .visualstudio.com),但我需要在连接到visualstudio.com时提示用户输入凭据。错误TF30063:以编程方式连接到visualstudio.com时强制提示输入凭据
的精神,下面的代码,它不工作
var aTeamProjects = new TfsTeamProjectCollection(m_oTfsCollectionUri);
aTeamProjects.ClientCredentials.PromptType = CredentialPromptType.PromptIfNeeded;
aTeamProjects.Authenticate();
在上面TF30063的Authenticate
- 请求结果代码类似:您没有权限访问.visualstudio.com。
它是一个客户端应用程序(例如Windows窗体,控制台应用程序)或Web应用程序?试试var c = new VssClientCredentials(); TfsTeamProjectCollection _tfs = new TfsTeamProjectCollection(m_oTfsCollectionUri,c); _ tfs.EnsureAuthenticated(); –
@ starain-MSFT我已添加更新。 – participant
您可以在另一台机器上重现此问题吗? –