繁体   English   中英

Web服务错误“没有端点在监听……”防火墙问题

[英]Web Service Error “There was no endpoint listening at…” Firewall Concern

因此,我有一个可以在localhost上运行的Web服务服务参考,可以从其生产url中对其进行ping操作,但是我无法通过生产中的Service Reference调用来访问它。 我相信问题是我的防火墙。 我在同一台服务器上有两个网站,每个网站都有自己的专用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>

您的配置正确。 我刚刚访问了您的服务器,一切正常(因此与代码无关)。

由于站点和网站位于同一服务器上,因此您可能需要使用其他IP或地址来访问wcf(尝试127.0.0.1,localhost或内部服务器ip)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM