为何我的RootManageSharedAccessKey连接字符串无效?
Azure Service Bus连接字符串无效问题
执行以下代码时,收到连接字符串无效的错误:
serviceBusClient = new ServiceBusClient(connectionString)
错误信息
System.NotImplementedException: 'The method or operation is not implemented.'
System.ArgumentException: 'The connection string used for an Service Bus client must specify the Service Bus namespace host and either a Shared Access Key (both the name and value) OR a Shared Access Signature to be valid. Parameter name: connectionString'
使用的连接字符串
"Endpoint=sb://myNameSpace.servicebus.windows.net/;TransportType=AmqpWebSockets;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=*******************************************="
也曾尝试移除连接字符串中的TransportType属性:
"Endpoint=sb://myNameSpace.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=*******************************************="
该连接字符串来自我的Service Bus资源的Shared Access Policy。
环境信息
- Xamarin.Forms (Android)
- Azure.Messaging.ServiceBus
NuGet包版本
- Azure.Messaging.ServiceBus (7.11.1)
- Xamarin.Forms (5.0.0.2545)
内容的提问来源于stack exchange,提问作者Scott Nimrod
相关产品推荐
相关产品推荐

