Azure 上托管的 HTTPS WCF 配置问题

发布于 2024-09-06 18:05:18 字数 1949 浏览 9 评论 0原文

我使用 Azure 上托管的第三方安全 WCF 服务。我正在尝试创建自己的安全 HTTPS 服务,但无法使用它。我能够在 Azure 上托管它,但是当我在客户端应用程序中使用它时,我收到以下错误

“没有端点在 https://xxxx.cloudapp.net/AsycServ/ AsycServCallback .svc 可以接受消息。这通常是由不正确的地址或 SOAP 操作引起的”

我比较了第三方服务的 WSDL 文件和我主持的那个。我发现了以下差异

wsdl: 第三方服务的服务部分

- <wsdl:service name="SubsManagement"><br/>
- <wsdl:port name="WSHttpBinding_IxxxManagement" binding="tns:WSHttpBinding_IxxxManagement"><br/>
 <soap12:address location="https://xxx.yyy.com/Syndication/SubscriptionManagement.svc" /> <br/>
- <wsa10:EndpointReference><br/>
 <wsa10:Address>https://xxx.yyy.com/Syndication/SubsMgmt.svc</wsa10:Address> <br/>
- <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"><br/>
 <Dns>xxx.yyy.com</Dns><strong> <br/>
</strong>
 </Identity><br/>
 </wsa10:EndpointReference><br/>
 </wsdl:port><br/>
 </wsdl:service>

wsdl: 我的服务的服务部分

- <wsdl:service name="AsycServCallback">
- <wsdl:port name="WSHttpBinding_IxxxCallback" binding="tns:WSHttpBinding_IxxxCallback">
 <soap12:address location="http://ippbposstage.cloudapp.net:81/MOSI/MOSICallback.svc" /> 
- <wsa10:EndpointReference>
 <wsa10:Address>http://xxx.cloudapp.net:81/test/AsycServCallback.svc</wsa10:Address> 
- <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
 <Dns>localhost</Dns> 
 </Identity>
 </wsa10:EndpointReference>
 </wsdl:port>
 </wsdl:service>

我发现了两个差异

  1. 第三方服务的地址位置不包含端口名称,而我的服务指向端口 81 ,但是 t 是托管在 HTTPS 上。因此,我期望地址中包含 https : 。

  2. 我的 WSDL 显示 = localhost 而对于第三方服务它是 =xxx.yyy.com 。

我是否缺少配置文件中的任何内容?

I using a third party secure WCF service hosted on Azure . I am trying to create my own secure HTTPS service but I am not able to use it. I am able to host it on Azure however when I use it in a client application I got following error

"There was no endpoint listening at https://xxxx.cloudapp.net/AsycServ/ AsycServCallback .svc that could accept the message. This is often caused by an incorrect address or SOAP action"

I compared the WSDL file of the third party service with the one I hosted. I found following difference

wsdl:Service section of third party service

- <wsdl:service name="SubsManagement"><br/>
- <wsdl:port name="WSHttpBinding_IxxxManagement" binding="tns:WSHttpBinding_IxxxManagement"><br/>
 <soap12:address location="https://xxx.yyy.com/Syndication/SubscriptionManagement.svc" /> <br/>
- <wsa10:EndpointReference><br/>
 <wsa10:Address>https://xxx.yyy.com/Syndication/SubsMgmt.svc</wsa10:Address> <br/>
- <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"><br/>
 <Dns>xxx.yyy.com</Dns><strong> <br/>
</strong>
 </Identity><br/>
 </wsa10:EndpointReference><br/>
 </wsdl:port><br/>
 </wsdl:service>

wsdl:service section of my service

- <wsdl:service name="AsycServCallback">
- <wsdl:port name="WSHttpBinding_IxxxCallback" binding="tns:WSHttpBinding_IxxxCallback">
 <soap12:address location="http://ippbposstage.cloudapp.net:81/MOSI/MOSICallback.svc" /> 
- <wsa10:EndpointReference>
 <wsa10:Address>http://xxx.cloudapp.net:81/test/AsycServCallback.svc</wsa10:Address> 
- <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
 <Dns>localhost</Dns> 
 </Identity>
 </wsa10:EndpointReference>
 </wsdl:port>
 </wsdl:service>

I found two differences

  1. Address location of the third party service does not contains port name while my service is pointing to port 81 , however t is hosted on HTTPS. So I was expecting https : in address.

  2. My WSDL shows = localhost while for third party service it is =xxx.yyy.com .

Am i missing anything in configuration file?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

泅人 2024-09-13 18:05:18

不确定我明白你想要完成什么。您应该能够在 Azure 上部署简单的 WCF 服务。您必须确保在服务定义中设置端口。通常,如果您想要使用 https,最简单的方法是将其保留在端口 443 上。此外,您需要确保将用于 https 的证书部署到 Azure。

如果您的示例部署在端口 81 上,那么您似乎需要将该端口添加到您的调用中。它将是 https://xxxx.cloudapp.net:81/AsycServ/AsycServCallback

希望有帮助。

Not sure I understand what you are trying to accomplish. You should be able to deploy a simple WCF service on Azure. You have to make sure that you set the port in the service definition. Normally if you want to go https, it is easiest to leave it on port 443. Also, you need to make sure you deploy the cert to Azure that you are using for https.

If your sample is deployed on port 81, it looks like you need to add the port to your call. It would be https://xxxx.cloudapp.net:81/AsycServ/AsycServCallback.

Hope that helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文