WCF错误 - 没有任何端点在听 [英] WCF error - There was no endpoint listening at

查看:371
本文介绍了WCF错误 - 没有任何端点在听的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个WCF服务,窗口Server 2003上运行IIS6我建立了一个测试客户端交谈的WCF服务,我得到下面的错误。我一直在寻找这个错误了几天,通过人民代表在论坛上建议,去了,但没有运气。任何帮助,将不胜感激,非常感谢



有没有在端点的 https://webbooking.infodata.uk.com/Synxis/Synxis.svc 是可以接受的消息。这通常是由一个不正确的地址或SOAP动作引起的。见的InnerException,如果存在的话,更多详情



  System.Net.WebException:远程服务器返回错误: (错误(404。 
在System.Net.HttpWebRequest.GetResponse()
在System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(时间跨度超时)

服务器堆栈跟踪:
在System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(引发WebException引发WebException,HttpWebRequest的要求,HttpAbortReason abortReason)在System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply
(时间跨度超时)
。在系统.ServiceModel.Channels.RequestChannel.Request(消息消息,时间跨度超时)
在System.ServiceModel.Dispatcher.RequestChannelBinder.Request(消息消息,时间跨度超时)
在System.ServiceModel.Channels.ServiceChannel.Call (字符串操作,布尔单向,ProxyOperationRuntime操作,对象[]项,对象[]奏,时间跨度超时)
在System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall,ProxyOperationRuntime操作)
。在系统.ServiceModel.Channels.ServiceChannelProxy.Invoke(即时聊天消息)
$ b $ [0]时b异常重新抛出:在System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(即时聊天reqMsg,即时聊天retMsg)

在System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&安培; MSGDATA,的Int32型)
在IOta2010A.ReservationSynch_SubmitRequest(ReservationSynchRequest要求)
在Ota2010AClient.IOta2010A.ReservationSynch_SubmitRequest(ReservationSynchRequest要求)在C:\Development\WorkingFolder\Webservices\SynxisNew\App_Code\\ \\OTA2010A.cs:在Ota2010AClient.ReservationSynch_SubmitRequest线57589
(安全保障,日期和放大器;时间戳,字符串的correlationID,字符串RelatesToCorrelationID,ReplyTo中的ReplyTo,OTA_HotelResNotifRQ OTA_HotelResNotifRQ)在C:\Development\WorkingFolder\Webservices\SynxisNew \App_Code\OTA2010A.cs:\Development\WorkingFolder\Webservices\SynxisNew\Update.aspx.cs:在Update.Page_Load(对象发件人,EventArgs e)在C线57601
线72

客户端配置



<预类=郎咸平的XML prettyprint-覆盖> <?XML版本=1.0编码=UTF-8>?;
<结构>
<&的System.Web GT;
<编译调试=真/>
< /system.web>
< system.serviceModel>
<&绑定GT;
<&的wsHttpBinding GT;
<绑定名称=ota2010AEndpointcloseTimeout =0时01分00秒openTimeout =0时01分00秒
receiveTimeout =0时10分00秒的SendTimeout =0时01分: 00bypassProxyOnLocal =假
transactionFlow =假hostNameComparisonMode =StrongWildcard
maxBufferPoolSize =524288maxReceivedMessageSize =6​​5536
messageEncoding =文本textEncoding =utf-8的useDefaultWebProxy =真正的
allowCookies =false的>
< readerQuotas MAXDEPTH =32maxStringContentLength =8192maxArrayLength =16384
maxBytesPerRead =4096maxNameTableCharCount =16384/>
<有序的ReliableSession =真正的inactivityTimeout =00:10:00$ B $ =使假/> B:
<安全模式=运输>
<运输clientCredentialType =无proxyCredentialType =无
境界=/>
<消息clientCredentialType =视窗negotiateServiceCredential =真正的
establishSecurityContext =真/>
< /安全>
< /&结合GT;
< /&的wsHttpBinding GT;
< /绑定>
<客户端>
<端点地址=htt​​ps://webbooking.infodata.uk.com/synxis/synxis.svc
结合=的wsHttpBindingbindingConfiguration =ota2010AEndpoint
合同=IOta2010A NAME =ota2010AEndpoint/>
< /客户>
< /system.serviceModel>
< /结构>



服务配置



<预类=郎咸平的XML prettyprint-覆盖> <?XML版本=1.0>?;
<结构>
<&的System.Web GT;
<编译调试=真targetFramework =4.0>
<&集会GT;
<添加组件=Pervasive.Data.SqlClient,版本= 2.10.0.34,文化=中性公钥= C84CD5C63851E072/>
< /组件>
< /编译>
<身份验证模式=窗口/>
<页面controlRenderingCompatibilityVersion =3.5的ClientIDMode =自动识别/>
< /system.web>
< system.serviceModel>
<服务和GT;
<服务名称=处SynxisbehaviorConfiguration =SynxisWCF>
<端点地址=NAME =wsHttpEndpoint绑定=的wsHttpBinding合同=处Synxis/>
<端点地址=MEX绑定=mexHttpBinding合同=IMetadataExchange接口/>
< /服务>
< /服务>
<诊断和GT;
< messageLogging logEntireMessage =真logMalformedMessages =真正的
logMessagesAtServiceLevel =真logMessagesAtTransportLevel =真正的
maxMessagesToLog =300/>
< /诊断>
<&行为GT;
< serviceBehaviors>
<行为NAME =SynxisWCF>
< serviceMetadata httpGetEnabled =真httpsGetEnabled =真externalMetadataLocation =htt​​ps://webbooking.infodata.uk.com/synxis/Synxis.svc.wsdl/>
< serviceDebug includeExceptionDetailInFaults =真/>
< /行为>
< / serviceBehaviors>
< /行为>
< /system.serviceModel>
< /结构>


解决方案

您没有定义在你的服务的配置有约束力的,所以你得到的默认值的wsHttpBinding ,以及 securityMode\transport 为默认值绑定消息



尝试复制从客户端的配置您绑定的配置为您服务的配置,并分配这个绑定到端点通过在 bindingConfiguration 属性:



<预类=郎咸平的XML prettyprint-覆盖> <绑定>
<&的wsHttpBinding GT;
<绑定名称=ota2010AEndpoint
......>
< readerQuotas MAXDEPTH =32... />
<有序的ReliableSession =真...... />
<安全模式=运输>
<运输clientCredentialType =无proxyCredentialType =无
境界=/>
<消息clientCredentialType =视窗negotiateServiceCredential =真正的
establishSecurityContext =真/>
< /安全>
< /&结合GT;
< /&的wsHttpBinding GT;
< /绑定>



(将配置保存在答案空间剪断部分)。



<预类=郎咸平的XML prettyprint-覆盖> <服务名称=处SynxisbehaviorConfiguration =SynxisWCF>
<端点地址=NAME =wsHttpEndpoint
结合=的wsHttpBinding
bindingConfiguration =ota2010AEndpoint
合同=处Synxis/>

这将然后分配你的定义(与交通运输安全)绑定到端点。


I am developing a WCF service, running IIS6 on Window server 2003. I have built a test client to talk to the WCF service and I am getting the error below. I have been looking at this error for days and went through people's suggestions on forums, but with no luck. Any help would be appreciated, many thanks

There was no endpoint listening at https://webbooking.infodata.uk.com/Synxis/Synxis.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

System.Net.WebException: The remote server returned an error: (404) Not Found.
  at System.Net.HttpWebRequest.GetResponse()
  at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)

Server stack trace: 
   at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
   at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at IOta2010A.ReservationSynch_SubmitRequest(ReservationSynchRequest request)
   at Ota2010AClient.IOta2010A.ReservationSynch_SubmitRequest(ReservationSynchRequest request) in c:\Development\WorkingFolder\Webservices\SynxisNew\App_Code\OTA2010A.cs:line 57589
   at Ota2010AClient.ReservationSynch_SubmitRequest(Security Security, DateTime& TimeStamp, String CorrelationID, String RelatesToCorrelationID, ReplyTo ReplyTo, OTA_HotelResNotifRQ OTA_HotelResNotifRQ) in c:\Development\WorkingFolder\Webservices\SynxisNew\App_Code\OTA2010A.cs:line 57601
   at Update.Page_Load(Object sender, EventArgs e) in c:\Development\WorkingFolder\Webservices\SynxisNew\Update.aspx.cs:line 72

Client config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.web>
    <compilation debug="true"/>
  </system.web>
  <system.serviceModel>
    <bindings>
        <wsHttpBinding>
            <binding name="ota2010AEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00"
                receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false"
                transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                allowCookies="false">
                <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                    maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                <reliableSession ordered="true" inactivityTimeout="00:10:00"
                    enabled="false" />
                <security mode="Transport">
                    <transport clientCredentialType="None" proxyCredentialType="None"
                        realm="" />
                    <message clientCredentialType="Windows" negotiateServiceCredential="true"
                        establishSecurityContext="true" />
                </security>
            </binding>
        </wsHttpBinding>
        </bindings>
        <client>
            <endpoint address="https://webbooking.infodata.uk.com/synxis/synxis.svc"
                binding="wsHttpBinding" bindingConfiguration="ota2010AEndpoint"
                contract="IOta2010A" name="ota2010AEndpoint" />
        </client>
    </system.serviceModel>
</configuration>

Service config

<?xml version="1.0"?>
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="Pervasive.Data.SqlClient, Version=2.10.0.34, Culture=neutral, PublicKeyToken=C84CD5C63851E072"/>
      </assemblies>
    </compilation>
    <authentication mode="Windows"/>
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/> 
  </system.web>
  <system.serviceModel>
    <services>
      <service name="Synxis" behaviorConfiguration="SynxisWCF">
        <endpoint address="" name="wsHttpEndpoint"  binding="wsHttpBinding" contract="Synxis" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
      </service>
    </services>
    <diagnostics>
      <messageLogging logEntireMessage="true" logMalformedMessages="true"
         logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true"
         maxMessagesToLog="300" />
    </diagnostics>
    <behaviors>
      <serviceBehaviors>
        <behavior name="SynxisWCF" >
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" externalMetadataLocation="https://webbooking.infodata.uk.com/synxis/Synxis.svc.wsdl" />
            <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>

解决方案

You do not define a binding in your service's config, so you are getting the default values for wsHttpBinding, and the default value for securityMode\transport for that binding is Message.

Try copying your binding configuration from the client's config to your service config and assign that binding to the endpoint via the bindingConfiguration attribute:

<bindings>
  <wsHttpBinding>
    <binding name="ota2010AEndpoint" 
             .......>
      <readerQuotas maxDepth="32" ... />
        <reliableSession ordered="true" .... />
          <security mode="Transport">
            <transport clientCredentialType="None" proxyCredentialType="None"
                       realm="" />
            <message clientCredentialType="Windows" negotiateServiceCredential="true"
                     establishSecurityContext="true" />
          </security>
    </binding>
  </wsHttpBinding>
</bindings>    

(Snipped parts of the config to save space in the answer).

<service name="Synxis" behaviorConfiguration="SynxisWCF">
    <endpoint address="" name="wsHttpEndpoint" 
              binding="wsHttpBinding" 
              bindingConfiguration="ota2010AEndpoint"
              contract="Synxis" />

This will then assign your defined binding (with Transport security) to the endpoint.

这篇关于WCF错误 - 没有任何端点在听的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆