我正在开发我的第一个Azure实现,我已经设置了我的azure帐户,我使用NuGet来安装正确的DLL并向我的应用程序提供信任。当我将WCF客户端设置为指向Service队列并运行该方法时,将得到以下异常:
Microsoft.ServiceBus.ServerErrorException
at Microsoft.ServiceBus.RelayedSocketInitiator.Connect(Uri uri, TimeSpan timeout)
at Microsoft.ServiceBus.ConnectivityModeConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
at Microsoft.ServiceBus.Channels.BufferedConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
at Microsoft.ServiceBus.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
at Microsoft.ServiceBus.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at Microsoft.ServiceBus.Channels.LayeredChannel`1.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)我的端点配置是:
<endpoint address="sb://MyService.servicebus.windows.net/MyServicequeue"
binding="netTcpRelayBinding" contract="PaperlessImportServiceWCF.PaperlessImportServiceSoap"
name="MyServiceServiceSoap" behaviorConfiguration="sbTokenProvider"/>我的endpoint行为是:
错误信息是非常通用的,我不知道我应该先看什么。
发布于 2013-02-09 00:34:53
我想你对接力服务的工作方式有一些误解。从您显示的配置中,您使用的是NetTcpRelayBinding,它用于请求-重放连接。但是,在您的端点中,您似乎使用队列地址作为端点。
如果您打算以请求应答的方式使用您的服务/客户端,那么您需要创建一个服务总线中继端点,并在您的端点中使用该地址。本教程是这个服务总线特性的一个很好的起点。
( b)如果您打算使用队列,那么您需要使用NetMessagingBinding。这个职位是如何执行上述场景的一个很好的起点。
在这两种情况下,似乎都使用了错误的基址。'myservice‘是您的servicebus命名空间的名称吗?如果不是,那么您应该用名称空间的名称来替换它。基本服务总线地址的格式是: protocol://YOUR_NAMESPACE.servicebus.windows.net
https://stackoverflow.com/questions/14781639
复制相似问题