Gab*_*abe 5 wsdl azure azureservicebus basichttprelaybinding
我有一个使用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 Endpoint to expose wsdl over the relay
ServiceEndpoint mexEndpoint = host.AddServiceEndpoint(ServiceMetadataBehavior.MexContractName,
new BasicHttpRelayBinding("MyAzureBindingConfiguration"),
"mex");
// Apply ACS Credentials for the mex endpoint
mexEndpoint.ApplyEndpointBehaviorConfig("MyAzureACSCredentials");
Run Code Online (Sandbox Code Playgroud)
尝试添加启用元数据行为的 serviceBehavior:
<behavior>
<serviceMetadata />
</behavior>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1011 次 |
| 最近记录: |