WCF EndpointNotFoundException

时间:2013-05-18 11:19:09

标签: .net wcf wcf-binding wcf-endpoint

我正在使用支付网关,我确实在本地实施并且工作正常,但是在我发生异常后立即部署在实时服务器上

[SocketException (0x274c): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 41.223.145.169:80]
   System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +208
   System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) +464

[WebException: Unable to connect to the remote server]
   System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) +6615245
   System.Net.HttpWebRequest.GetRequestStream() +13
   System.ServiceModel.Channels.WebRequestHttpOutput.GetOutputStream() +55

[EndpointNotFoundException: There was no endpoint listening at http://paymentapi.com/webpayservice.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.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +10614671
   System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +336
   GoWedding.WebPayService.WebPayService.GetTransactionData(TransactionQueryRequest transactionQueryRequest) +0
   GoWedding.WebPayService.WebPayServiceClient.GetTransactionData(TransactionQueryRequest transactionQueryRequest) +62
   GoWedding.TestPage.Button1_Click(Object sender, EventArgs e) +262
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9553178
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +103
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724

以下是添加服务引用时生成的配置设置

<system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_WebPayService" 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">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
              maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="None" proxyCredentialType="None"
                realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://paymentapi.com/webpayservice.svc"
          binding="basicHttpBinding"
          contract="WebPayService.WebPayService" name="BasicHttpBinding_WebPayService" />
      <!--bindingConfiguration="BasicHttpBinding_WebPayService"-->
    </client>
  </system.serviceModel>

也可以从浏览器访问服务URL

0 个答案:

没有答案