简体   繁体   English

没有端点可以在https://…上侦听该消息。 这通常是由错误的地址或SOAP操作引起的

[英]There was no endpoint listening at https://… that could accept the message. This is often caused by an incorrect address or SOAP action

I'm using a 3rd party web service, i can view and run it no problem from the browser 我正在使用第三方网络服务,我可以从浏览器中查看和运行它

在此处输入图片说明

I've added the Service References to visual studio and specified the namespage: 我已将服务参考添加到visual studio并指定了名称页:

在此处输入图片说明

As it's a web app so i've copied the relevant bits from app.config to web.config 由于它是一个网络应用程序,因此我将相关位从app.config复制到了web.config

  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="MembersSoap">
          <security mode="Transport"> 
            <transport clientCredentialType="None" proxyCredentialType="None" realm=""/> 
            <message clientCredentialType="Certificate" algorithmSuite="Default" />
         </security>
         </binding>
        <binding name="BookingsSoap">
          <security mode="Transport"> 
            <transport clientCredentialType="None" proxyCredentialType="None" realm=""/> 
            <message clientCredentialType="Certificate" algorithmSuite="Default" />
         </security>
         </binding> 

      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="https://server/directory/Members.asmx" binding="basicHttpBinding" bindingConfiguration="MembersSoap" contract="MWSMembers.MembersSoap" name="MembersSoap" />
      <endpoint address="https://server/directory/Bookings.asmx" binding="basicHttpBinding" bindingConfiguration="BookingsSoap" contract="MWSBookings.BookingsSoap" name="BookingsSoap" />

   </client>
  </system.serviceModel>

Here's my method using the MWSBookings web service: 这是我使用MWSBookings网络服务的方法:

private string GetBookings()
{
    using (MWSBookings.BookingsSoapClient client = new MWSBookings.BookingsSoapClient())
    {
        try
        {

            var bookings = client.ListBookableActivitiesClassesCourses(GetMemberAuthHeader2(), 0123456, "5", false);
            return bookings.ToString();

        }
        catch (Exception ex)
        {
            return ex.Message.ToString();
        }
    }


}

When i build my solution and view the browser page i get the following error: 当我构建解决方案并查看浏览器页面时,出现以下错误:

There was no endpoint listening at https://server/directory/Bookings.asmx that could accept the message. https://server/directory/Bookings.asmx上没有侦听终结点的端点可以接受该消息。 This is often caused by an incorrect address or SOAP action. 这通常是由不正确的地址或SOAP操作引起的。 See InnerException, if present, for more details. 有关更多详细信息,请参见InnerException(如果存在)。

I have searched through all the other posts on Stack Overflow and none of the solutions have helped my situation. 我搜索了Stack Overflow上的所有其他帖子,但没有一种解决方案对我的情况有所帮助。 I've ensured the HTTP Activation Feature is installed, I've tried running the AppPool from appPoolIdentity to NetworkService and that didn't help. 我已经确保安装了HTTP激活功能,已经尝试将AppPool从appPoolIdentity运行到NetworkService,但这没有帮助。 Also tried including maxRequestLength and maxAllowedContentLength in web.config and increasing limits but no difference. 还尝试在web.config中包括maxRequestLength和maxAllowedContentLength并增加限制,但没有区别。

I'd be grateful if anyone can offer any advise. 如果有人可以提供任何建议,我将不胜感激。

thanks Scott 谢谢斯科特

UPDATE Here's the full exception message: 更新这里是完整的异常消息:

        System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at https://server/directory/Bookings.asmx 
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: Unable to connect to the remote server ---> 
System.Net.Sockets.SocketException: 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 
MYIP:443 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, 
SocketAddress socketAddress) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket 
s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, 
IAsyncResult asyncResult, Exception& exception) --- End of inner exception 
stack trace --- at 
    System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) at 
System.Net.HttpWebRequest.GetRequestStream() at 
    System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream(
) --- End of inner exception stack trace --- Server stack trace: at 
    System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream(
) at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout) at 
    System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChan
nelRequest.SendRequest(Message message, TimeSpan timeout) at 
    System.ServiceModel.Channels.RequestChannel.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(IMethodCallMes
sage 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 
    MySolution.MWSBookings.BookingsSoap.ListBookableActivitiesClassesCourses(List
BookableActivitiesClassesCoursesRequest request) at 
    MySolution.MWSBookings.BookingsSoapClient.MySolution.MWSBookings.BookingsSoap
.ListBookableActivitiesClassesCourses(ListBookableActivitiesClassesCoursesReq
uest request) in D:\website\branches\csharp\Service References\MWSBookings
\Reference.cs:line 4464 at MySolution.MWSBookings.BookingsSoapClient.ListBookableActivitiesClassesCourses(AuthHeader AuthHeader, Int32 memberId, String siteId, Boolean webBookableOnly) in D:\website\branches\csharp\Service References\MWSBookings\Reference.cs:line 4473 at MySolution.ActivityFinder.GetBookings() in D:\website\branches\csharp\Service References\Classes\MyClass.cs:line 97 

The issue was with a proxy server, i've added the following lines before i call my webservice and the error message has now gone. 问题出在代理服务器上,我在调用网络服务之前添加了以下几行,现在错误消息消失了。

var proxy = new WebProxy("myproxy:8080", true);

proxy.Credentials = new NetworkCredential("username", "password");

WebRequest.DefaultWebProxy = proxy;

暂无
暂无

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

相关问题 没有端点监听GPService可以接受该消息。 这通常是由不正确的地址或SOAP操作引起的。 - There was no endpoint listening GPService that could accept the message. This is often caused by an incorrect address or SOAP action. 在 net.tcp://url 上没有侦听端点可以接受消息。 这通常是由不正确的地址或 SOAP 操作引起的 - There was no endpoint listening at net.tcp://url that could accept the message. This is often caused by an incorrect address or SOAP action 在 {0} 处没有侦听端点可以接受消息。 这通常是由不正确的地址或 SOAP 操作引起的。 (Xamarin 安卓) - There was no endpoint listening at {0} that could accept the message. This is often cause by an incorrect address or SOAP action. (Xamarin Android) ASP核心“没有在[url]上侦听的终结点可以接受该消息。 ” - ASP Core “There was no endpoint listening at [url] that could accept the message. ” wcf-代码中的客户端绑定-错误:“没有端点监听.svc来接受消息。” - wcf - Client Binding in Code- Error : “There was no endpoint listening at .svc that could accept the message.” 没有端点在听……可以接受该消息 - There was no endpoint listening at…that could accept the message WCF:没有端点在侦听,可以接受消息 - WCF: There was no endpoint listening at, that could accept the message 没有端点监听 <url> 可以接受消息 - There was no endpoint listening at <url> that could accept the message 没有端点侦听 (url) 可以接受消息 - There was no endpoint listening at (url) that could accept the message 使用WCF Web服务时“没有侦听端点可以接受消息” - “There was no endpoint listening at that could accept the message” when consuming WCF web service
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM