Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 没有端点在侦听https://... 这可以接受这个信息。这通常是由不正确的地址或SOAP操作引起的_C#_Asp.net_Web Services_Wcf - Fatal编程技术网

C# 没有端点在侦听https://... 这可以接受这个信息。这通常是由不正确的地址或SOAP操作引起的

C# 没有端点在侦听https://... 这可以接受这个信息。这通常是由不正确的地址或SOAP操作引起的,c#,asp.net,web-services,wcf,C#,Asp.net,Web Services,Wcf,我使用的是第三方web服务,我可以在浏览器中查看和运行它,没有问题 我已将服务引用添加到visual studio并指定了名称页: 因为它是一个web应用程序,所以我将相关的位从app.config复制到了web.config <system.serviceModel> <bindings> <basicHttpBinding> <binding name="MembersSoap"> &

我使用的是第三方web服务,我可以在浏览器中查看和运行它,没有问题

我已将服务引用添加到visual studio并指定了名称页:

因为它是一个web应用程序,所以我将相关的位从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>
生成解决方案并查看浏览器页面时,出现以下错误:

没有可以接受消息的端点正在侦听。这通常是由不正确的地址或SOAP操作引起的。有关更多详细信息,请参阅InnerException(如果存在)

我已经搜索了关于堆栈溢出的所有其他帖子,没有一个解决方案对我的情况有帮助。我已确保安装了HTTP激活功能,并尝试将AppPool从appPoolIdentity运行到NetworkService,但没有任何帮助。还尝试在web.config中包含maxRequestLength和maxAllowedContentLength,并增加限制,但没有区别

如果有人能提供任何建议,我将不胜感激

谢谢 斯科特

更新 以下是完整的异常消息:

        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 

问题在于代理服务器,在调用webservice之前,我添加了以下几行代码,错误消息现在已经消失了

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

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

WebRequest.DefaultWebProxy = proxy;

1、当您打开web浏览器时,是否必须安装任何身份验证证书才能连接到站点,它是否要求您选择证书?2.是否有任何身份验证登录/Pw?3.在Catch块中,您应该更改它:如果存在InnerException,则返回该消息,否则,返回异常消息。可能防火墙正在阻止您的应用?确保在管理模式下运行它privileges@tgolisch您好,我想我可能因为代理服务器而遇到问题,如果我的流量需要通过代理服务器,我应该在web.config中使用哪些正确的设置?我试过了,但没有luck@komsky嗨,Komsky,我不认为这是防火墙问题,我在上面发布了一些进一步的异常消息,它表明这是代理问题。知道我如何添加代理凭据以允许应用程序通过吗?
var proxy = new WebProxy("myproxy:8080", true);

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

WebRequest.DefaultWebProxy = proxy;