Issue on connect...

Feb 14, 2016 at 11:36 PM
Edited Feb 14, 2016 at 11:40 PM
I'm having an issue attempting to connect to an Azure Event Hub from my Netduino 3 WiFi...

When calling the Connect method in TcpTransport, it's failing at Dns.GetHostEntry(address.Host). It doesn't throw an exception, it just never gets to the next line. Here's a screenshot of the breakpoint (https://www.dropbox.com/s/7xuvybk4zf0sg4o/breakpoint.png?dl=0):
Image

Any ideas why this might be happening?

Here is my connection code:
static void SendMessage(string eventhubHost, string eventhubname)
  {
     try
     {
        // create address
        var address = new Address("amqps://RootManageSharedAccessKey:<sharedkey>@<eventhubname>-ns.servicebus.windows.net");

        // create connection
        var connection = new Connection(address);

        // create session
        var session = new Session(connection);

        // if no partition id is presented, the message distribution will be managed by Event Hub
        var sendLink = new SenderLink(session, "send-link:" + eventhubname, eventhubname);

        // construct message
        var messageValue = Encoding.UTF8.GetBytes("i am a message.");

        // here, AMQP supports 3 types of body, here we use Data.
        var message = new Message() { BodySection = new Data() { Binary = messageValue } };

        sendLink.Send(message);
        sendLink.Close();
        session.Close();
        connection.Close();
     }
     catch (Exception ex)
     {
        _log.Log(ex.Message);
     }
  }