gpt4 book ai didi

wcf - 基于 SSL 的 Azure Web 服务返回错误的 SOAP 地址位置

转载 作者:行者123 更新时间:2023-12-03 06:04:19 26 4
gpt4 key购买 nike

我有一个在 Azure 上通过 SSL 运行的云服务;我可以浏览到该服务并通过 SSL 获取其 wsdl,但是当我这样做时,soap 地址位置 返回不正确 - 而不是使用绑定(bind)到我获得的证书的域名服务器名称

< soap:address location="http:// rd00155d45cc3c/Amazon.svc"/>

我期待看到

< soap:address location="https://azure.mydomain.com/Amazon.svc"/>

我的配置

<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="AzureBinding">
<security mode="Transport" />
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="MyService">
<endpoint address="" binding="basicHttpBinding"
contract="StudentServiceWCF.IAmazon"
bindingConfiguration="AzureBinding" />
<endpoint address="mex" binding="mexHttpsBinding"
contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>

我的 app.config 客户端端点已配置

<endpoint address="https://azure.mydomain.com/Amazon.svc"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IOutOfDateSecure"
contract="AzureService.IAmazon" name="BasicHttpBinding_IAmazon" />

<binding name="BasicHttpBinding_IAmazon">
<security mode="Transport" />
</binding>

我不知道如何影响地址位置,因此它使用我的证书中的域名。因为它返回 http 位置,所以测试客户端抛出异常:

The HTTP service located at http:// rd00155d45cc3c/Amazon.svc is unavailable

最佳答案

所以,评论有点过时,但请检查 this article .

第 6 步 描述了要添加的行为 (UseRequestHeadersForMeatadataAddress) 及其引入时间:KB981002- WCF:修补程序汇总更新。这将解决您的问题。

KB981001 是 Windows 的官方修补程序/更新。它必须安装在您的开发计算机和部署服务的 Windows Azure 实例上。但是,如果您没有明确定位旧的 Guest OS (specific osVersion) ,该修补程序必须已安装。

关于wcf - 基于 SSL 的 Azure Web 服务返回错误的 SOAP 地址位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15877064/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com