- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个使用 AppFabric 自动启动的 svc。我想做的是expose the wsdl for my service over the bus 。当然,在内部,服务和 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
我是否需要将 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>
这是我的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");
最佳答案
尝试添加启用元数据行为的 serviceBehavior:
<behavior>
<serviceMetadata />
</behavior>
关于azure - 通过 Azure 公开 BasicHttpRelayBinding 上的 WSDL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13923026/
创建 WCF 配置文件时,我可能会在 Visual Studio 中遇到此错误,因为 VS 编辑器不知道该扩展名。我需要知道在哪里放置 TransportClientEndpointBehavior,
我有一个使用 AppFabric 自动启动的 svc。我想做的是expose the wsdl for my service over the bus 。当然,在内部,服务和 wsdl 工作得很好,我
我是一名优秀的程序员,十分优秀!