我们无法确定为什么Azure BasicHttpRelay偶尔会抛出FaultException没有任何细节.我们已启用WCF诊断跟踪,但可用的堆栈跟踪信息仍然相同.似乎WCF客户端通道在短时间内失败,然后很快返回.
我们确实缓存了WCF频道(例如CreateChannel),但这是我们第一次遇到这种奇怪的行为.我们有其他Azure Service Bus中继解决方案可以正常使用这种方法.
处理请求时遇到错误.
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at [our WCF method]...
名称: ServerErrorFault
命名空间: http ://schemas.microsoft.com/netservices/2009/05/servicebus/relay
IsPredefinedFault: false
IsReceiverFault: false
IsSenderFault: false
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header />
<s:Body>
<s:Fault> …Run Code Online (Sandbox Code Playgroud) wcf azure azure-sdk-.net basichttprelaybinding azure-servicebusrelay
我有一个使用AppFabric自动启动的svc.我想要做的是通过总线公开我的服务的wsdl.在内部服务和wsdl工作正常,我也可以通过总线消费服务没有问题.我唯一无法正确配置的是在继电器上查看wsdl.
在ServiceHostFactory创建默认端点,也增加了Azure的端点,希望一个MEX终结一起暴露在继电器的WSDL.当我尝试从服务总线URL查看wsdl时,我得到了不匹配的错误,可能是由于ACS身份验证失败了?
...cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree
Run Code Online (Sandbox Code Playgroud)
我是否需要将mex端点设置为匿名身份验证,以便我可以访问浏览器并查看wsdl?只是不确定还有什么可以尝试...任何帮助将不胜感激!
示例网址:
http://myservicebusexample.servicebus.windows.net/MyService/AService.svc?wsdl
要么
http://myservicebusexample.servicebus.windows.net/MyService/AService.svc/mex
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
Run Code Online (Sandbox Code Playgroud)
所以这是我的 ServiceHostFactory
// Create host with default endpoints
ServiceHost host = new ServiceHost(serviceType, baseAddresses);
host.AddDefaultEndpoints();
// Create Relay Endpoint for Azure
ServiceEndpoint relayEndpoint = host.AddServiceEndpoint(typeof(IMyContract), new BasicHttpRelayBinding("MyAzureBindingConfiguration"), relayAddress);
// Apply ACS Credentials for the relay endpoint
relayEndpoint.ApplyEndpointBehaviorConfig("MyAzureACSCredentials");
// Create mex …Run Code Online (Sandbox Code Playgroud)