title: IIS 7 ERR_CONNECTION_TIMED_OUT only with public IP
body: <p>I'm working with WCF on IIS 7.</p>
  
  <p>Previously, I have done a WCF library and set it to work on IIS 7. It works well, also if I use it with our public IP.</p>
  
  <p>Then, I have done a WCF application and set it to work on the same IIS 7. The address is the same, the difference is in the port. This WCF works when I call it with the internal IP, but is I use the external IP, I get a timed out error.</p>
  
  <p>You can try yourself, this is the pubblic address:</p>
  
  <p><a href="http://77.108.40.77:8096/" rel="nofollow">http://77.108.40.77:8096/</a></p>
  
  <p>(if you put 8095 as port, it works).</p>
  
  <p>Why am I getting this? (ERR_CONNECTION_TIMED_OUT)</p>
  
  <p>This is my web.config:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;configuration&gt;
  
        &lt;configSections&gt;
  &lt;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;
  &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.``0, Culture=neutral, ``PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
    &lt;/configSections&gt;
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.5" /&gt;
       &lt;httpRuntime targetFramework="4.5" /&gt;
     &lt;/system.web&gt;
    &lt;system.serviceModel&gt;
      &lt;services&gt;
    &lt;service name="MultipayOnline.Service1" &gt;
      &lt;!--bindingConfiguration="SecurityByTransport"--&gt;
      &lt;!--&lt;endpoint address="" binding="basicHttpBinding" bindingConfiguration="SecurityByTransport" name="base" contract="CardServiceLib.ICardService"&gt;--&gt;
  
        &lt;endpoint address="" name="base"
                behaviorConfiguration="restBehavior"
                binding="webHttpBinding"
                contract="MultipayOnline.IMultiPOService" &gt;
        &lt;identity&gt;
          &lt;dns value="localhost"/&gt;
        &lt;/identity&gt;
      &lt;/endpoint&gt;
    &lt;/service&gt;
  &lt;/services&gt;
  &lt;bindings&gt;
    &lt;webHttpBinding&gt;
      &lt;binding name="SecurityByTransport" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" &gt;
        &lt;readerQuotas maxDepth="2000000" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /&gt;
        &lt;security mode="TransportCredentialOnly"&gt;
          &lt;transport clientCredentialType="Basic"/&gt;
        &lt;/security&gt;
      &lt;/binding&gt;
    &lt;/webHttpBinding&gt;
  &lt;/bindings&gt;
  
  
  &lt;extensions&gt;
    &lt;behaviorExtensions&gt;
      &lt;add name="CorsSupport" type="WebHttpCors.CorsSupportBehaviorElement, WebHttpCors, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" /&gt;
    &lt;/behaviorExtensions&gt;
  &lt;/extensions&gt;
  
  
  &lt;behaviors&gt;
    &lt;endpointBehaviors&gt;
      &lt;behavior name="restBehavior"&gt;
        &lt;!--&lt;enableWebScript/&gt;--&gt;
        &lt;webHttp helpEnabled="true"/&gt;
        &lt;CorsSupport /&gt;
      &lt;/behavior&gt;
    &lt;/endpointBehaviors&gt;
    &lt;serviceBehaviors&gt;
      &lt;behavior&gt;
        &lt;serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /&gt;
        &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
        &lt;dataContractSerializer ignoreExtensionDataObject="true" maxItemsInObjectGraph="123456" /&gt;
      &lt;/behavior&gt;
      &lt;!--&lt;behavior name="customBehavior"&gt;
        &lt;serviceMetadata httpGetEnabled="True" httpsGetEnabled="True"/&gt;
        &lt;serviceDebug includeExceptionDetailInFaults="True"/&gt;
        &lt;dataContractSerializer ignoreExtensionDataObject="true" maxItemsInObjectGraph="123456" /&gt;
        &lt;serviceCredentials&gt;
          &lt;userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="MultipayOnline.CustomPass, MultipayOnline"/&gt;
        &lt;/serviceCredentials&gt;
      &lt;/behavior&gt;--&gt;
    &lt;/serviceBehaviors&gt;
  &lt;/behaviors&gt;
  &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /&gt;
  
  
  &lt;protocolMapping&gt;
    &lt;add binding="basicHttpsBinding" scheme="https" /&gt;
  &lt;/protocolMapping&gt;
    &lt;/system.serviceModel&gt;
    &lt;system.webServer&gt;
  &lt;modules runAllManagedModulesForAllRequests="true" /&gt;
  &lt;!--
      Per sfogliare la directory radice dell'applicazione Web durante il debug, impostare il valore riportato sotto su true.
      Impostarlo su false prima della distribuzione per evitare di diffondere informazioni sulla cartella dell'applicazione Web.
    --&gt;
  &lt;directoryBrowse enabled="true" /&gt;
  &lt;!--&lt;httpProtocol&gt;
    &lt;customHeaders&gt;
      &lt;add name="Access-Control-Allow-Origin" value="*" /&gt;
    &lt;/customHeaders&gt;
  &lt;/httpProtocol&gt;--&gt;
    &lt;/system.webServer&gt;
  
  
    &lt;connectionStrings&gt;&lt;add name="isMultiPayOnLineEntities" connectionString="..." providerName="System.Data.EntityClient" /&gt;    &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>
      
      
        
      
    
  </p>
  
  <p>Can you help me? Can I post something to you for make clearer the trouble?</p>