来自窗口小部件的超链接 - TF400813:资源不可用于匿名访问 [英] Hyperlinks from a widget - TF400813: Resource not available for anonymous access

查看:403
本文介绍了来自窗口小部件的超链接 - TF400813:资源不可用于匿名访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在开发一个TFS小部件,它列出了团队项目的Git存储库,并提供了直接转到每个仓库的链接。


代码基本上是

 VSS.require(" TFS / VersionControl / GitRestClient",function(RestClient){

var client = RestClient.getClient();
var webContext = VSS.getWebContext();

client.getRepositories(webContext.project.id,true)
。然后(函数(repos){
repos.forEach(function(repo){
$(" .repo-list")。append('< li>< a href ="' + repo.remoteUrl +'"" target =" _blank">'+ repo.name +'< / a>< / li>');

});



});
});

正确显示存储库列表,超链接见好的。


当我点击其中一个链接时,会打开正确的repo页面,但错误信息是显示:


TF400813:资源不可用于匿名访问。需要客户端身份验证


TFS版本是2017年更新1 RC2。


任何想法?


谢谢,


Shay


解决方案

您好,


感谢您在此发帖。


您使用的是哪个客户?如果您使用的是Visual Studio,请尝试以下解决方法。


出现此问题是因为Visual Studio令牌缓存正在更改,要刷新令牌,您必须重新进行身份验证。


要解决此问题,请按以下步骤操作:


  1. 帮助菜单上,点击注册产品
  2. 请注意帐户设置对话框。
  3. 点击退出
  4. 注销过程完成后,单击登录
  5. 关闭"帐户设置"对话框。

重新启动Visual Studio并重新登录后,错误应该消失。


最诚挚的问候。


Hi,

I'm developing a TFS widget which lists the team project's Git repositories and provides links to go directly to each repo.

The code is basically this

	VSS.require("TFS/VersionControl/GitRestClient", function (RestClient) {
	
		var client = RestClient.getClient();		
		var webContext = VSS.getWebContext();
		
		client.getRepositories(webContext.project.id, true)
			.then(function(repos) {
				repos.forEach(function (repo) {				
					$(".repo-list").append('<li><a href="' + repo.remoteUrl + '" " target="_blank">' + repo.name + '</a></li>');

				});
			
			

			});
	});

The list of repositories is displayed properly and the hyperlinks see ok.

When I click one of the links, the correct repo page is opened but an error message is displayed:

TF400813: Resource not available for anonymous access. Client authentication required

TFS version is 2017 Update 1 RC2.

Any ideas?

Thank You,

Shay

解决方案

Hi shay,

Thank you for posting here.

What client do you use? Please try below workaround if you are using the Visual Studio.

This problem occurs because the Visual Studio token cache is changing, to refresh the token, you have to reauthenticate.

To work around this problem, follow these steps:

  1. On the Help menu, click Register Product.
  2. Note the Account Settings dialog box opens.
  3. Click Sign-out.
  4. After sign-out process is finished, click Sign in.
  5. Close the Account Settings dialog box.

After a restart of Visual Studio and signing back in, the error should be gone.

Best Regards.


这篇关于来自窗口小部件的超链接 - TF400813:资源不可用于匿名访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆