【问题标题】:There was no endpoint listening at "https://...." that could accept the message在“https://....”处没有可以接受消息的端点侦听
【发布时间】:2016-03-25 14:44:04
【问题描述】:
<?xml version="1.0" ?>
<configuration>
<connectionStrings>
<add name="SqlServerConnectionString" connectionString=""/>
<add name="OracleConnectionString" connectionString="user id=DBGDEV;password=123;data source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=****.r..****)(PORT=1584))(CONNECT_DATA=(SERVICE_NAME=****)))" />
</connectionStrings>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true">
</compilation>
</system.web>
<system.serviceModel>
<behaviors>
  <serviceBehaviors>
    <behavior name="serviceBehavior">         
       <serviceMetadata httpsGetEnabled="true"/>
      <serviceDebug includeExceptionDetailInFaults="false" />
    </behavior>
  </serviceBehaviors>
  <endpointBehaviors>
    <behavior name="httpEndpointBehavour">
      <webHttp/>
    </behavior>
  </endpointBehaviors>
</behaviors>
<services>
  <service name="Implementation.AccountService" behaviorConfiguration="serviceBehavior">
    <endpoint address="" binding="webHttpBinding" contract="Contract.IAccountService" behaviorConfiguration="httpEndpointBehavour"bindingConfiguration="webHttpBinding" />
    <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
  </service>
</services>
  <bindings>
  <basicHttpBinding>
    <binding name="WCFsoap" closeTimeout="00:01:00" openTimeout="00:01:00"
        receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
        bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
        maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
        messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
        useDefaultWebProxy="true">
       <security mode="Transport">
        <transport clientCredentialType="Basic" proxyCredentialType="Basic"
            realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default" />
      </security>
    </binding>
    <binding name="WCFsoap1" closeTimeout="00:01:00" openTimeout="00:01:00"
        receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
        bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
        maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
        messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
        useDefaultWebProxy="true">
      <security mode="None">
        <transport clientCredentialType="None" proxyCredentialType="None"
            realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default"/>
      </security>
    </binding>
  </basicHttpBinding>
  <webHttpBinding>
    <binding name="webHttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" useDefaultWebProxy="true">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
      <security mode="Transport">
        <transport clientCredentialType="None" />
      </security>
    </binding>
  </webHttpBinding>
</bindings>
<client>
  <endpoint address="https://test.myservice.com/rally_generic_ws.do?SOAP"
           binding="basicHttpBinding" bindingConfiguration="WCFsoap"
           contract="serviceName.WCFsoap" name="WCFsoap" />
</client>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
</modules>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
</handlers>
</system.webServer>
<system.codedom>    
</system.codedom>
<runtime>    
</runtime>
</configuration>

以上代码属于Service web.config。

错误“没有在“https://test.myservice.com/rally_generic_ws.do?SOAP”处侦听可以接受消息的端点这通常是由不正确的地址或 SOAP 操作引起的”。 这个错误可能是什么原因。我因此被阻止。请指导我。

下一期

当我在 wcf 测试客户端中添加 https 作为服务引用时,在我的 web.config 中进行某些更改后,我收到以下错误。 无法从https://server-uat:8090/service.svc 获取元数据。 如果这是您有权访问的 Windows (R) Communication Foundation 服务,请检查您是否已在指定地址启用元数据发布。 有关启用元数据发布的帮助,请参阅位于 http://go.microsoft.com/fwlink/?LinkId=65455 的 MSDN 文档。 WS 元数据交换错误 URI:https://server-uat:8090/service.svc 元数据包含无法解析的引用:“http://192.168.0.15:8090/service.svc”。
https://test.myservice.com/rally_generic_ws.do?SOAP 没有端点监听 可以接受该消息。这通常是由不正确的地址或 SOAP 操作引起的。

有关详细信息,请参阅内部异常(如果存在)。
远程服务器返回错误:(404) Not Found.HTTP GET Error URI: https://server-uat:8090/service.svc

URL https://server-uat:8090/service.svc 处的文档未被识别为已知文档类型。每种已知类型的错误消息可能会帮助您解决问题:-

来自'https://server-uat:8090/service.svc'的报告是'无法识别文档格式(内容类型为'text/html; charset=UTF-8')。'.- 无法解析远程名称:'**********'- 来自 'WSDL Document' 的报告是 '无法识别文档格式(内容类型为 'text/html; charset=UTF-8 ').'.- 来自“XML Schema”的报告是“无法识别文档格式(内容类型为 'text/html; charset=UTF-8')。”。

这是我尝试将服务添加到 wcf 测试客户端时遇到的错误。这个错误的原因是什么。如何摆脱这个错误。

据我所知,我猜客户端在服务器中找不到请求的操作。我需要更改 web.config 吗??

【问题讨论】:

  • 在 web config 端点中是否使用 http 而不是 https?
  • 在客户端地址中,我提供了外部 wsdl url(test.myservicenow.com/rally_generic_ws.do?SOAP),我正在评估它以获得所需的输出。由于 url 在 https 中并且我已经在浏览器中运行了 url使用 https,所以它不应该是 http。url 使用代理和密码保护。所以我已经在我的 web 服务代码中传递了所需的代理和密码。

标签: web-services wcf soap web-config iis-6


【解决方案1】:

客户端的端点和服务的端点不匹配

    <client>
    <endpoint binding="customBinding" bindingConfiguration="WebHttpBinding_ImyService"
        contract="IEventLoggerService" name="WebHttpBinding_ImyService" />
    </client>

<service name="Implementation.EventLoggerService" behaviorConfiguration="serviceBehavior">
    <endpoint address="" binding="webHttpBinding" contract="Contract.IAccountService" behaviorConfiguration="httpEndpointBehavour"bindingConfiguration="webHttpBinding" />
    <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
</service>

如果您查看服务的地址,它们显然与您的客户正在收听的地址不匹配。此外,没有服务履行 IEventLoggerService 合同。

您是否可能缺少服务端点?

编辑:

您遇到的问题是您的 web.config 文件中的此客户端端点没有侦听它的服务

<client>
  <endpoint address="https://test.myservice.com/rally_generic_ws.do?SOAP"
       binding="basicHttpBinding" bindingConfiguration="WCFsoap"
       contract="serviceName.WCFsoap" name="WCFsoap" />
</client>

现在我在这里做了一个很大的假设 -> 正在读取您的 web.config 文件的服务既是该服务的生产者又是消费者。假设,我建议添加另一个嵌套在 web.config 文件中的服务标签内的服务端点

<endpoint address = "https://test.myservicenowmyservice.com/rally_generic_ws.do?SOAP" 
contract = "serviceName.WCFSoap"  binding = "BasicHttpBinding" name ="WCFsoap"
bindingConfiguration ="WCFsoap"/>

现在,如果您的服务旨在履行 serviceName.WCFSoap 合同,这应该可以正常工作。如果没有,那么您应该确保旨在履行该合同的任何服务实际上都具有该端点。

希望对你有帮助

【讨论】:

  • 让我总结一下“您希望我在服务标签中再添加一个端点。而且我必须确保我指定的合同应该履行 Web 服务”。如果我错了,请纠正我?
  • 是的。当然,这是假设您的服务有一些东西可以履行该合同。
猜你喜欢
  • 2021-08-29
  • 1970-01-01
  • 1970-01-01
  • 2010-12-01
  • 2018-06-06
  • 2023-03-18
  • 2019-05-29
相关资源
最近更新 更多