locked
System.ServiceModel.EndpointNotFoundException RRS feed

  • Question

  • User601688711 posted

    Hi, I'm workinf for first time with webservices and I'm obtainning an exception and I don't know how to find the error. I would like know what steps I should follow to find and correct the possible error.

    I don't believe that be an error code because I'm using a webservice that works with a winform but it doesn't with a Console app.

    I've transformed the code referencing all the classes I need, so I've only changed the presentation, I mean, instead of click a button I execute the code (without any params, it's the next step). I'm not receiving any error, but when the webservice it's being to be executed It stops and 20 seconds after appear the exception on the console. I don't believe that be a timeout exception because it appears more fast than the time configured.

    I'm obtainning the next exception. I've allready checked that I've all the dlls needed but I don't know what else to check and I haven't been able to find any information:

    System.ServiceModel.EndpointNotFoundException: No había ningún extremo escuchando en http://192.1.1.144/WCFGeoPlusMarket/TiposActividad.svc que pudiera aceptar el mensaje. La causa suele ser una dirección o una acción SOAP incorrecta. Consulte InnerException, si está presente, para obtener más información. ---> System.Net.WebException: No es posible conectar con el servidor remoto ---> System.Net.Sockets.SocketException: Se produjo un error durante el intento de conexión ya que la parte conectada no respondió adecuadamente tras un periodo de tiempo, o bien se produjo un error en la conexión establecida ya que el host conectado no ha podido responder 192.1.1.144:80
       en System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
       en System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
       --- Fin del seguimiento de la pila de la excepción interna ---
       en System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
       en System.Net.HttpWebRequest.GetRequestStream()
       en System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
       --- Fin del seguimiento de la pila de la excepción interna ---
    
    Server stack trace:
       en System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
       en System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
       en System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout)
       en System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
       en System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
       en System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       en System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       en System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    I will continue searching. Thanks.

    Wednesday, June 19, 2013 11:25 AM

Answers

  • User601688711 posted

    Solved! At last the problem was that I was looking the bad app.config. Instead of look the file of my own project (app console) I was looking the app.config of the winform, because the 2 are subprojects of one bigger and I did believe that the two were referencing to the same file. I've seen this because when I've tried to trace the file any log file was created and I had permission to write on the folder I had created. Thanks to all for your time and for show me the way to trace a webservice. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 21, 2013 5:32 AM

All replies

  • User220959680 posted

    System.ServiceModel.EndpointNotFoundException:

    Above exception can occur when

    1. The service URL(SOAP service) or URI(RESTFul) service is incorrect.

    2. Firewall blocking the communication at port level

    3. Make sure that the security is NOT implemented in service, which requires valid credentials.

    Note that enabling the Tracing can reveal provide useful info for troubleshooting.

    Refer http://forums.asp.net/t/1753395.aspx/1

    Wednesday, June 19, 2013 2:07 PM
  • User-488622176 posted

    Or there simply no server running hosting the SVC file...

    Wednesday, June 19, 2013 2:34 PM
  • User601688711 posted

     

    sukumarraju

    1. The service URL(SOAP service) or URI(RESTFul) service is incorrect.

    2. Firewall blocking the communication at port level

    3. Make sure that the security is NOT implemented in service, which requires valid credentials.

    Note that enabling the Tracing can reveal provide useful info for troubleshooting.

    Hi! thanks for your info and your suggestions, the qüestion is that the webservice is working with the winform but not with console app. So I believe that the service and the URI are correct, the firewall it's unblocked (I've checked it) and security not implemented. I understand that if some of these things wouldn't be ok the winform wouldn't work too. I'm going to activate the Tracing and I'll continuos investigating. Thanks again for all your suggestions.

    Edited:

    The security is set to none in all svc

    <binding name="BasicHttpBinding_ISyncTiposActividad" closeTimeout="00:01:00"
       openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
       allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
       maxBufferSize="5000000" maxBufferPoolSize="524288" maxReceivedMessageSize="5000000"
       messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
       useDefaultWebProxy="true">
       <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
          maxBytesPerRead="4096" maxNameTableCharCount="16384" />
       <security mode="None">
          <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
          <message clientCredentialType="UserName" algorithmSuite="Default" />
       </security>
    </binding>



     

    Thursday, June 20, 2013 4:02 AM
  • User601688711 posted

    Illeris

    Or there simply no server running hosting the SVC file...

    But then the webservice wouldn't work on the winform app. Isn't ok? or I'm confused? Thanks.

    Edited to explain a little more:

    Moreover if I add the URL on the browser I'm obtainning answer.

    Thursday, June 20, 2013 4:03 AM
  • User601688711 posted

    Solved! At last the problem was that I was looking the bad app.config. Instead of look the file of my own project (app console) I was looking the app.config of the winform, because the 2 are subprojects of one bigger and I did believe that the two were referencing to the same file. I've seen this because when I've tried to trace the file any log file was created and I had permission to write on the folder I had created. Thanks to all for your time and for show me the way to trace a webservice. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 21, 2013 5:32 AM