David Pfeffer
David Pfeffer

Reputation: 39862

Azure worker role becomes unresponsive after internal tcp connection with web role

I'm posting the question that first appears here because it seems that it is dead on the Microsoft forums. Plus, Stack Overflow is better. :-P

I'm hosting a TCP endpoint in a worker role on Azure --

var _breadcrumbServiceHost = new ServiceHost(typeof(BreadcrumbService));
var binding = new NetTcpBinding(SecurityMode.None);
var externalEndPoint = RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["shuttles"];
_breadcrumbServiceHost.AddServiceEndpoint(typeof(IBreadcrumbService), binding, String.Format("net.tcp://{0}/BreadcrumbService", externalEndPoint.IPEndpoint));

And I get two thrown exceptions --

System.InvalidProgramException  -  Common Language Runtime detected an invalid program

and

Unhandled exception: System.Runtime.CallbackException: Async Callback threw an exception. ---> System.InvalidProgramException: Common Language Runtime detected an invalid program.
   at System.ServiceModel.Dispatcher.ErrorBehavior.HandleErrorCommon(Exception error, ErrorHandlerFaultInfo& faultInfo)
   at System.ServiceModel.Dispatcher.ChannelDispatcher.HandleError(Exception error, ErrorHandlerFaultInfo& faultInfo)
   at System.ServiceModel.Dispatcher.ChannelDispatcher.HandleError(Exception error)
   at System.ServiceModel.Dispatcher.ErrorHandlingReceiver.EndTryReceive(IAsyncResult result, RequestContext& requestContext)
   at System.ServiceModel.Dispatcher.ChannelHandler.EndTryReceive(IAsyncResult result, RequestContext& requestContext)
   at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result)
   at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
   at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)

It doesn't always happen -- sometimes Azure is perfectly happy.

Help!! Thanks.

Upvotes: 1

Views: 886

Answers (1)

David Pfeffer
David Pfeffer

Reputation: 39862

Solved it! It appears there's an issue with WCF hosted in a worker and IntelliTrace. Disabling IntelliTrace solved it.

Upvotes: 1

Related Questions