这个错误通常是由于混合连接字符串中的Authorization规范无效而引起的。请检查连接字符串是否正确设置并确保Authorization规范正确。以下是示例代码:
var connectionString = "Endpoint=sb://
var hybridConnection = new HybridConnectionClient(new Uri($"sb://{connectionString}/;EntityPath={hybridConnectionName}"));
// 改变认证规范
var signature = SasTokenProvider.GetSharedAccessSignature("
// 连接到混合连接 var relayConnection = await hybridConnection.CreateRelayConnectionAsync(); Console.WriteLine($"Connected to relay: {relayConnection.Id}"); Console.ReadLine();