All went well, as I got the UI running.
Then I added the QueueConnector class, initialized it in global.asax, and in the HomeController Submit() methods used the Queue -- by copy/paste from the tutorial.
Here is the method it is throwing the exception, in the call to QueueConnector.OrdersQueueClient.Send().
// POST: /Home/Submit// Controler method for handling submissions from the submission// form [HttpPost] // Attribute to help prevent cross-site scripting attacks and // cross-site request forgery [ValidateAntiForgeryToken] publicActionResult Submit(OnlineOrder order) { if (ModelState.IsValid) { // Create a message from the ordervar message = newBrokeredMessage(order); // Submit the orderQueueConnector.OrdersQueueClient.Send(message); return RedirectToAction("Submit"); } else { return View(order); } }
The exception is as follows, and I am running VS 2012 as the admin user as required in the tutorial:
Microsoft.ServiceBus.Messaging.MessagingCommunicationException was unhandled by user code
HResult=-2146233088
Message=Channel Open did not complete within the specified timeout of 00:01:00.
Source=Microsoft.ServiceBus
IsTransient=true
StackTrace:
at Microsoft.ServiceBus.Common.ExceptionDispatcher.Throw(Exception exception)
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.RunSynchronously()
at Microsoft.ServiceBus.Messaging.MessageSender.OnSend(TrackingContext trackingContext, IEnumerable`1 messages, TimeSpan timeout)
at Microsoft.ServiceBus.Messaging.MessageSender.Send(TrackingContext trackingContext, IEnumerable`1 messages, TimeSpan timeout)
at Microsoft.ServiceBus.Messaging.MessageSender.Send(BrokeredMessage message)
at Microsoft.ServiceBus.Messaging.QueueClient.Send(BrokeredMessage message)
at FrontendWebRole.Controllers.HomeController.Submit(OnlineOrder order) in c:\SWDev\VS2012\Vantage\MultiTierApp\FrontendWebRole\Controllers\HomeController.cs:line 97
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.InvokeSynchronousActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult](IAsyncResult asyncResult, Object tag)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
InnerException: System.ServiceModel.CommunicationException
HResult=-2146233087
Message=Channel Open did not complete within the specified timeout of 00:01:00.
Source=Microsoft.ServiceBus
StackTrace:
Server stack trace:
at Microsoft.ServiceBus.Messaging.Channels.SharedChannel`1.CreateChannelAsyncResult.<GetAsyncSteps>d__7.MoveNext()
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.MoveNextStep()
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.EnumerateSteps(CurrentThreadType state)
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
at Microsoft.ServiceBus.Common.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
Exception rethrown at [0]:
at Microsoft.ServiceBus.Common.ExceptionDispatcher.Throw(Exception exception)
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Common.AsyncResult`1.End(IAsyncResult asyncResult)
at Microsoft.ServiceBus.Messaging.Channels.SharedChannel`1.OnEndCreateInstance(IAsyncResult asyncResult)
at Microsoft.ServiceBus.Messaging.SingletonManager`1.EndGetInstance(IAsyncResult asyncResult)
at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.RequestAsyncResult.<GetAsyncSteps>b__2(RequestAsyncResult thisPtr, IAsyncResult r)
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
Exception rethrown at [1]:
at Microsoft.ServiceBus.Common.ExceptionDispatcher.Throw(Exception exception)
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Messaging.SingletonManager`1.AsyncWaiter.End(IAsyncResult asyncResult, TSingleton& result)
at Microsoft.ServiceBus.Messaging.SingletonManager`1.EndGetInstance(IAsyncResult asyncResult)
at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.RequestAsyncResult.<GetAsyncSteps>b__2(RequestAsyncResult thisPtr, IAsyncResult r)
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
Exception rethrown at [2]:
at Microsoft.ServiceBus.Common.ExceptionDispatcher.Throw(Exception exception)
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Common.AsyncResult`1.End(IAsyncResult asyncResult)
at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.EndRequest(IAsyncResult result)
at Microsoft.ServiceBus.Messaging.Sbmp.RedirectBindingElement.RedirectContainerChannelFactory`1.RedirectContainerSessionChannel.RequestAsyncResult.<>c__DisplayClass17.<GetAsyncSteps>b__a(RequestAsyncResult thisPtr, IAsyncResult r)
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
Exception rethrown at [3]:
at Microsoft.ServiceBus.Common.ExceptionDispatcher.Throw(Exception exception)
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Common.AsyncResult`1.End(IAsyncResult asyncResult)
at Microsoft.ServiceBus.Messaging.Sbmp.RedirectBindingElement.RedirectContainerChannelFactory`1.RedirectContainerSessionChannel.EndRequest(IAsyncResult result)
at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.RequestAsyncResult.<GetAsyncSteps>b__4(RequestAsyncResult thisPtr, IAsyncResult r)
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
Exception rethrown at [4]:
at Microsoft.ServiceBus.Common.ExceptionDispatcher.Throw(Exception exception)
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Common.AsyncResult`1.End(IAsyncResult asyncResult)
at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.EndRequest(IAsyncResult result)
at Microsoft.ServiceBus.Messaging.Sbmp.SbmpTransactionalAsyncResult`1.<GetAsyncSteps>b__3b(TIteratorAsyncResult thisPtr, IAsyncResult a)
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
Exception rethrown at [5]:
at Microsoft.ServiceBus.Common.ExceptionDispatcher.Throw(Exception exception)
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Common.AsyncResult`1.End(IAsyncResult asyncResult)
at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageSender.EndSendCommand(IAsyncResult result)
InnerException: System.TimeoutException
HResult=-2146233083
Message=The open operation did not complete within the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout.
Source=System.ServiceModel.Internals
StackTrace:
Server stack trace:
at Microsoft.ServiceBus.Channels.ClientFramingDuplexSessionChannel.OpenAsyncResult.HandleEstablishConnection(IAsyncResult result)
at Microsoft.ServiceBus.Channels.ClientFramingDuplexSessionChannel.OpenAsyncResult.OnEstablishConnection(IAsyncResult result)
Exception rethrown at [0]:
at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Channels.CommunicationObject.EndOpen(IAsyncResult result)
at Microsoft.ServiceBus.Messaging.Channels.SharedChannel`1.CreateChannelAsyncResult.<GetAsyncSteps>b__4(CreateChannelAsyncResult thisPtr, IAsyncResult r)
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
InnerException: System.TimeoutException
HResult=-2146233083
Message=Open timed out after 00:01:00 while establishing a transport session to sb://vantagetrdwfpoc1.servicebus.windows.net:80/. The time allotted to this operation may have been a portion of a longer timeout.
Source=Microsoft.ServiceBus
StackTrace:
Server stack trace:
at Microsoft.ServiceBus.Channels.ConnectionPoolHelper.EstablishConnectionAsyncResult.HandleConnect(IAsyncResult connectResult)
at Microsoft.ServiceBus.Channels.ConnectionPoolHelper.EstablishConnectionAsyncResult.OnConnect(IAsyncResult result)
Exception rethrown at [0]:
at Microsoft.ServiceBus.Common.ExceptionDispatcher.Throw(Exception exception)
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Channels.ConnectionPoolHelper.EstablishConnectionAsyncResult.End(IAsyncResult result)
at Microsoft.ServiceBus.Channels.ConnectionPoolHelper.EndEstablishConnection(IAsyncResult result)
at Microsoft.ServiceBus.Channels.ClientFramingDuplexSessionChannel.OpenAsyncResult.HandleEstablishConnection(IAsyncResult result)
InnerException: System.TimeoutException
HResult=-2146233083
Message=The request has timed out after 00:01:00 milliseconds. The successful completion of the request cannot be determined. Additional queries should be made to determine whether or not the operation has succeeded.
Source=Microsoft.ServiceBus
StackTrace:
Server stack trace:
Exception rethrown at [0]:
at Microsoft.ServiceBus.Common.ExceptionDispatcher.Throw(Exception exception)
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Common.AsyncResult`1.End(IAsyncResult asyncResult)
at Microsoft.ServiceBus.WebStreamOnewayConnectionInitiator.EndConnect(IAsyncResult result)
at Microsoft.ServiceBus.Channels.BufferedConnectionInitiator.EndConnect(IAsyncResult result)
at Microsoft.ServiceBus.Channels.ConnectionPoolHelper.EstablishConnectionAsyncResult.HandleConnect(IAsyncResult connectResult)
InnerException: System.TimeoutException
HResult=-2146233083
Message=The operation did not complete within the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout.
Source=Microsoft.ServiceBus
StackTrace:
Server stack trace:
Exception rethrown at [0]:
at Microsoft.ServiceBus.Common.ExceptionDispatcher.Throw(Exception exception)
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Common.BeginEndAsyncWaitHandle.WaitAsyncResult.End(IAsyncResult result)
at Microsoft.ServiceBus.Common.BeginEndAsyncWaitHandle.EndWait(IAsyncResult result)
at Microsoft.ServiceBus.WebStreamOnewayConnectionInitiator.ConnectAsyncResult.<GetAsyncSteps>b__2(ConnectAsyncResult thisPtr, IAsyncResult r)
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
InnerException:How do I get past this?
Thanks in advance, George