与 Web 角色进行内部 tcp 连接后,Azure 辅助角色变得无响应

发布于 2024-09-25 07:37:27 字数 1901 浏览 0 评论 0原文

我发布了首先出现的问题 这里因为它似乎在微软论坛上已经死了。另外,Stack Overflow 更好。 :-P

我在 Azure 上以辅助角色托管 TCP 端点 -

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));

我收到两个抛出的异常 -

System.InvalidProgramException  -  Common Language Runtime detected an invalid program

而且

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)

这种情况并不总是发生 - 有时 Azure 非常高兴。

帮助!!谢谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

疯到世界奔溃 2024-10-02 07:37:27

解决了!工作线程和 IntelliTrace 中托管的 WCF 似乎存在问题。禁用 IntelliTrace 解决了这个问题。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文