I'm delving into azure Iot hubs and connected technologie for work, using the tutorial found here: https://azure.microsoft.com/nl-nl/documentation/articles/iot-hub-csharp-csharp-getstarted/
When running the receiver example (this section of the article: https://azure.microsoft.com/nl-nl/documentation/articles/iot-hub-csharp-csharp-getstarted/#receive-device-to-cloud-messages)
I get an error on the line:
var d2cPartitions = eventHubClient.GetRuntimeInformation().PartitionIds;
I get this error (complete error log at the bottom):
Message=An AMQP error occurred (condition='amqp:link:redirect').
I cannot find what causes this, since I use a basic example, and my hub appears rightly configured. Sending works fine btw. Anyone got an idea?
Complete error log:
Microsoft.ServiceBus.Messaging.MessagingException was unhandled
HResult=-2146233088
IsTransient=true
Message=An AMQP error occurred (condition='amqp:link:redirect').
Source=Microsoft.ServiceBus
StackTrace:
Server stack trace:
Exception rethrown at [0]:
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Messaging.AmqpClient.AmqpManagementLink.EndCreateManagementLink(IAsyncResult result)
at Microsoft.ServiceBus.Messaging.Amqp.FaultTolerantObject`1.CreateAsyncResult.<GetAsyncSteps>b__4(CreateAsyncResult thisPtr, IAsyncResult r)
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
Exception rethrown at [1]:
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Common.AsyncResult`1.End(IAsyncResult asyncResult)
at Microsoft.ServiceBus.Messaging.Amqp.FaultTolerantObject`1.OnEndCreateInstance(IAsyncResult asyncResult)
at Microsoft.ServiceBus.Messaging.SingletonManager`1.EndGetInstance(IAsyncResult asyncResult)
at Microsoft.ServiceBus.Messaging.AmqpClient.AmqpManagementLink.AmqpManagementOperationAsyncResult`1.<GetAsyncSteps>b__21(T thisPtr, IAsyncResult r)
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
Exception rethrown at [2]:
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Messaging.Amqp.AmqpEventHubClient.GetRuntimeInfoAsyncResult.<GetAsyncSteps>b__18(GetRuntimeInfoAsyncResult thisPtr, IAsyncResult r)
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
Exception rethrown at [3]:
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.RunSynchronously()
at Microsoft.ServiceBus.Messaging.Amqp.AmqpEventHubClient.GetRuntimeInformation()
at ReadDeviceToCloudMessages.Program.Main(String[] args) in C:\Users\tmartena\documents\visual studio 2015\Projects\azureTestDevice\ReadDeviceToCloudMessages\Program.cs:line 21
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: