"no endpoint listening" WITH "no connection could be made because the target machine actively refused it"

695 views Asked by At

We are having a rather intermittent issue with our enterprise application where were are getting an "EndPointNotFoundException" that we could not find the issue. However, on some off chance while debugging the solution we came acrossthe error and were able to grab the inner exceptions. I should note that before we got this error there was a communication error right before it (for a task manager) but the data for that was not captured, unfortunately.

System.ServiceModel.EndpointNotFoundException was unhandled by user code
  HResult=-2146233087
  Message=There was no endpoint listening at http://localhost/GetData.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
  Source=mscorlib
  StackTrace:
    Server stack trace: 
       at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
       at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
       at System.ServiceModel.Channels.HttpChannelFactory1.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, 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.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
       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 PROGRAM.DataServices.IGetData.GetUserLoggedInStatus(String userID, String fullName)
       at PROGRAM.DataServices.GetDataClient.GetUserLoggedInStatus(String userID, String fullName) in C:\PATH\Reference.cs:line 3419
       at PROGRAM.BusinessLayer.clsUtilities.CheckLoggedInStatus(String userID) in C:\PATH\clsUtilities.cs:line 438
       at PROGRAM.DashBoard.Timer_Tick(Object sender, EventArgs e) in C:\PATH\clsDashboard_Events.cs:line 99
       at System.Windows.Forms.Timer.OnTick(EventArgs e)
       at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.StartDispatcherInBrowser(Object unused)
  InnerException: System.Net.WebException
       HResult=-2146233079
       Message=Unable to connect to the remote server
       Source=System
       StackTrace:
            at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
            at System.Net.HttpWebRequest.GetRequestStream()
            at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
       InnerException: System.Net.Sockets.SocketException
            HResult=-2147467259
            Message=No connection could be made because the target machine actively refused it [::1]:1346
            Source=System
            ErrorCode=10061
            NativeErrorCode=10061
            StackTrace:
                 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)

We think it might be our contract with services being violated for that connection when ever it fails since it "ACTIVELY" ignores the request but other than that we are not sure.

0

There are 0 answers