【发布时间】:2013-05-20 00:48:24
【问题描述】:
所以我有一个在本地主机上工作的 Web 服务服务引用,可以从其生产 url ping,但我无法通过生产中的服务引用调用访问它。我相信问题是我的防火墙。我在同一台服务器上有两个网站,每个网站都有自己的专用 IP 地址。我正在尝试从第一个网站调用第二个网站上的 Web 服务。如果我在生产服务器上打开浏览器,我无法导航到任何一个网站。
错误描述:在 http://[209.112.245.103]/Services/OfferService.asmx 上没有可以接受消息的端点侦听。这通常是由不正确的地址或 SOAP 操作引起的。有关详细信息,请参阅 InnerException(如果存在)。
内部异常:无法连接到远程服务器
调用网站在同一台服务器上(当然是不同的 IP),并通过服务引用调用 Web 服务:
Dim offerService As New ServiceReferenceOffer.OfferServiceSoapClient("OfferServiceSoap")
offerService.BroadcastOfferChange(offer.PropertyID, offer.OfferID, offer.ResultResponse)
而我的 web.config 包含以下服务端点信息:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="OfferServiceSoap" />
<binding name="ConversationServiceSoap" />
</basicHttpBinding>
<customBinding>
<binding name="OfferServiceSoap12">
<textMessageEncoding messageVersion="Soap12" />
<httpTransport />
</binding>
<binding name="ConversationServiceSoap12">
<textMessageEncoding messageVersion="Soap12" />
<httpTransport />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="http://209.112.245.103/Services/ConversationService.asmx"
binding="basicHttpBinding" bindingConfiguration="ConversationServiceSoap"
contract="ServiceReferenceConversation.ConversationServiceSoap"
name="ConversationServiceSoap" />
<endpoint address="http://209.112.245.103/Services/ConversationService.asmx"
binding="customBinding" bindingConfiguration="ConversationServiceSoap12"
contract="ServiceReferenceConversation.ConversationServiceSoap"
name="ConversationServiceSoap12" />
<endpoint address="http://209.112.245.103/Services/OfferService.asmx"
binding="basicHttpBinding" bindingConfiguration="OfferServiceSoap"
contract="ServiceReferenceOffer.OfferServiceSoap" name="OfferServiceSoap" />
<endpoint address="http://209.112.245.103/Services/OfferService.asmx"
binding="customBinding" bindingConfiguration="OfferServiceSoap12"
contract="ServiceReferenceOffer.OfferServiceSoap" name="OfferServiceSoap12" />
</client>
</system.serviceModel>
【问题讨论】:
-
检查端点设置是否在 web.config 上。另外,请尝试使用其他工具进行连接,例如 SOAPUI。
-
我在 web.config 中有我的端点设置。而且,如果我错了,请纠正我,但由于我可以在浏览器中 ping http://[209.112.245.103]/Services/OfferService.asmx,我认为 SoapUI 无法进一步帮助我......
标签: asp.net web-services firewall