简体   繁体   English

主题客户服务总线挂起

[英]TopicClient Service Bus hangs

I have very weird issue while trying to send message to azure service bus topic. 尝试向Azure Service Bus主题发送消息时,我遇到了一个很奇怪的问题。

 TopicClient topicClient = 
     TopicClient.CreateFromConnectionString(ServiceBusConnectionString, 
     TopicName);

This is inside a webapi project . 这是在webapi项目中。 My code just hangs on this line, and does not creates TopicClient. 我的代码只是挂在这行上,没有创建TopicClient。

Now If I use the same code with same connectionstring and topicname in console application, it works perfect. 现在,如果我在控制台应用程序中使用具有相同连接字符串和主题名称的相同代码,则可以完美运行。

At loss to troubleshoot. 不知所措以进行故障排除。 Network issue is ruled out as well. 也排除了网络问题。

Anyone faced this before? 有人遇到过吗?

I faced the exacts same problem with 我面临着完全相同的问题

QueueClient.CreateFromConnectionString(...)

Updating Microsoft.ServiceBus.Messaging nuget to the latest version solved the issue. 将Microsoft.ServiceBus.Messaging nuget更新到最新版本解决了该问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM