title: EndpointNotFoundException 'Could not connect' because 'the target machine actively refused it' Connecting through Fiddler
body: <p>I am encountering an issue trying to route my WCF client requests through Fiddler. I have searched the web high and low, and found only two references to Fiddler having problems when WCF services are configured to listen on IPv4, but IPv6 is enabled. However, while my issue is similar, it does not seem to be my problem.</p>
  
  <p>I am encountering issues connecting to services hosted on IPv4 ports. The following exception is thrown by my WCF clients when my bindings are configured to use the fiddler proxy. I have disabled IPv6 support in Fiddler's options, and made sure my bindings are properly configured to use the proxy.</p>
  
  <p><strong>Exception report:</strong></p>
  
  <blockquote>
    <p>System.ServiceModel.EndpointNotFoundException:
    Could not connect to
    <a href="http://campus.services.ecollege-labs.com/Entity/Foundation/v1.0/EducationalPartnerSvc" rel="nofollow noreferrer">http://campus.services.ecollege-labs.com/Entity/Foundation/v1.0/EducationalPartnerSvc</a>.
    TCP error code 10061: No connection
    could be made because the target
    machine actively refused it
    10.181.3.23:8888.  ---> System.Net.WebException: Unable to
    connect to the remote server --->
    System.Net.Sockets.SocketException: No
    connection could be made because the
    target machine actively refused it
    10.181.3.23:8888    at System.Net.Sockets.Socket.DoConnect(EndPoint
    endPointSnapshot, SocketAddress
    socketAddress)    at
    System.Net.ServicePoint.ConnectSocketInternal(Boolean
    connectFailure, Socket s4, Socket s6,
    Socket&amp; socket, IPAddress&amp; address,
    ConnectSocketState state, IAsyncResult
    asyncResult, Int32 timeout, Exception&amp;
    exception)    --- End of inner
    exception stack trace ---    at
    System.Net.HttpWebRequest.GetRequestStream(TransportContext&amp;
    context)    at
    System.Net.HttpWebRequest.GetRequestStream()
    at
    System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
    --- End of inner exception stack trace ---</p>
    
    <p>Server stack trace:     at
    System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
    at
    System.ServiceModel.Channels.HttpOutput.Send(TimeSpan
    timeout)    at
    System.ServiceModel.Channels.HttpChannelFactory.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.ServiceChannelProxy.InvokeService(IMethodCallMessage
    methodCall, ProxyOperationRuntime
    operation)    at
    System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage
    message)</p>
    
    <p>Exception rethrown at [0]:     at
    System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
    reqMsg, IMessage retMsg)    at
    System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp;
    msgData, Int32 type)    at
    IMS.EnterpriseServices.Facades.Campus.EducationalPartner.EducationalPartnerSvc.FindByClientString(String
    clientString)    at
    IMS.EnterpriseServices.Facades.Campus.EducationalPartner.EducationalPartnerSvcClient.FindByClientString(String
    clientString) in
    C:\P4\HEDI\AS2-dev-dotnext-campus-dev\AS\HEI\Src\CAS\IMS.EnterpriseServices.Facades.Campus\Service
    References\EducationalPartner\Reference.cs:line
    428    at
    IMS.EnterpriseServices.Facades.Campus.CampusEntityFacade.GetEPID(String
    clientString) in
    C:\P4\HEDI\AS2-dev-dotnext-campus-dev\AS\HEI\Src\CAS\IMS.EnterpriseServices.Facades.Campus\CampusEntityFacade.cs:line
    37    at
    IMS.EnterpriseServices.Transformation.Domain.TransformationSvc.TransformCreateGroupRequest(createGroupRequestMessage
    message) in
    C:\P4\HEDI\AS2-dev-dotnext-campus-dev\AS\HEI\Src\CAS\IMS.EnterpriseServices.Transformation.Domain\TransformationSvc.cs:line
    106    at
    IMS.EnterpriseServices.Facades.IMSFacade.TransformCreateGroupRequest(createGroupRequestMessage
    imsMessage) in
    C:\P4\HEDI\AS2-dev-dotnext-campus-dev\AS\HEI\Src\CAS\IMS.EnterpriseServices.Facades\IMSFacade.cs:line
    113    at
    IMS.EnterpriseServices.Domain.TransformationAndEnrichmentCoordinator.ProcessCreateGroupRequestMessage(createGroupRequestMessage
    message) in
    C:\P4\HEDI\AS2-dev-dotnext-campus-dev\AS\HEI\Src\CAS\IMS.EnterpriseServices.Domain\TransformationAndEnrichmentCoordinator.cs:line
    140    at
    IMS.EnterpriseServices.Facades.IMSFacade.&lt;>c__DisplayClass1.b__0(Object
    o) in
    C:\P4\HEDI\AS2-dev-dotnext-campus-dev\AS\HEI\Src\CAS\IMS.EnterpriseServices.Facades\IMSFacade.cs:line
    135</p>
  </blockquote>
  
  <p><strong>Binding Configuration:</strong></p>
  
  <pre><code>&lt;customBinding&gt;
    &lt;!-- Secured, WS-Security message signing and encryption, custom binding for IMS endpoints --&gt;
    &lt;binding name="customHttpSecuredNoWSA"&gt;
      &lt;security
        defaultAlgorithmSuite="Basic128Rsa15"
        authenticationMode="MutualCertificate"
        securityHeaderLayout="Lax"
        includeTimestamp="false"
        keyEntropyMode="CombinedEntropy"
        messageProtectionOrder="SignBeforeEncrypt"
        messageSecurityVersion="WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"
        requireSignatureConfirmation="false"
        requireSecurityContextCancellation="false"
        allowSerializedSigningTokenOnReply="true"&gt;
        &lt;localServiceSettings detectReplays="false" /&gt;
      &lt;/security&gt;
      &lt;textMessageEncoding
        messageVersion="Soap11"
        writeEncoding="utf-8"&gt;
        &lt;readerQuotas
          maxArrayLength="1048576"
          maxStringContentLength="4194304"
          maxBytesPerRead="4194304"
          maxNameTableCharCount="4194304"
        /&gt;
      &lt;/textMessageEncoding&gt;
      &lt;httpTransport
        maxBufferPoolSize="4194304"
        maxBufferSize="1048576"
        maxReceivedMessageSize="1048576"
        proxyAddress="http://my.host.name:8888"
        useDefaultWebProxy="false"
      /&gt;
    &lt;/binding&gt;
  &lt;/customBinding&gt;
  </code></pre>