4

我已经从 GIT 下载了 Service Bus Explorer。我能够连接到服务总线队列和主题。但是当我尝试连接到事件中心时,我遇到了一些问题。错误--> 异常:System.UnauthorizedAccessException:远程服务器返回错误:(401)未授权。索赔为空。没有选择通过任何索赔。IN连接字符串也没有这样的参数。

最初它可以工作,但在我创建一个新的事件中心工具后停止工作

Failed to retrieve EventHub entities. Exception: System.UnauthorizedAccessException: The remote server returned an error: 
(401) Unauthorized. claim is empty. TrackingId:92ab37f6-452a-48c4-ae20-af7f0e64915b_G25, SystemTracker:ehn-g3ms-tutor.servicebus.windows.net:$Resources/EventHubs, Timestamp:2019-07-11T11:08:52 ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized
4

1 回答 1

6

也许你犯了和我一样的错误。当您创建“事件中心”时,您定义:1) 命名空间和 2) 事件中心。他们都有自己的“共享访问策略”。也许您将策略创建到“事件中心”并复制并粘贴到“服务总线资源管理器”中。但是您应该使用的连接字符串被命名为“RootManageSharedAccessKey”(位于命名空间中) ,正如您在这张图片中看到的那样

于 2020-03-29T10:58:31.757 回答