Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

Attempting to Send data to Event Hub - No connection could be made because the target machine actively refused it

$
0
0

Found this simple piece of code that *should* send an event to my Event hub.  The connection string is good and no matter what I've tried it comes back to the exception getting thrown on client.Send(data).

Dim connectionString As String = ConfigurationManager.AppSettings("EventsHubManage.ConnectionString") Dim builder As New ServiceBusConnectionStringBuilder(connectionString) builder.TransportType = TransportType.Amqp Dim factory As MessagingFactory = MessagingFactory.CreateFromConnectionString(builder.ToString()) Dim client As EventHubClient = factory.CreateEventHubClient("mecpieventhub") Dim data As New EventData(Encoding.UTF8.GetBytes("Hello"))

client.Send(data)

I've read a few places that corporate firewalls can get in the way but I'm pretty sure port 5671 is open.  We followed the 'Service Bus Events Hub' article exactly and it gives us the same error.  I'm going to try at home tonight but was wondering if this is a common error for people getting started.

Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>