Getting 'An existing connection was forcibly c

2019-06-19 16:51发布

问题:

While trying to follow the 'Get Started with Events Hub' example for Microsoft Azure (http://azure.microsoft.com/en-us/documentation/articles/service-bus-event-hubs-csharp-ephcs-getstarted/#introduction), when I try to run either receiver or sender programs defined there, I get the following exception: 'An existing connection was forcibly closed by the remote host.'

Since this is while trying to connect to Azure, and in the Azure portal everything seems to be in place (following the example mentioned above), I am stuck.

I am using West Europe location for my Event Hub.

回答1:

Something you want to try:

  1. Make sure your connection string is connect.
  2. Try to ping host part in your connection string.
  3. Check the firewall.
  4. Check whether you really send some messages and have messages to receive, since idle connection might be closed.