IIS 7 ERR_CONNECTION_TIMED_OUT only with public IP

12.1k views Asked by At

I'm working with WCF on IIS 7.

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.

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.

You can try yourself, this is the pubblic address:

http://77.108.40.77:8096/

(if you put 8095 as port, it works).

Why am I getting this? (ERR_CONNECTION_TIMED_OUT)

This is my web.config:

<?xml version="1.0" encoding="utf-8"?>
    <configuration>

      <configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.``0, Culture=neutral, ``PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <system.web>
    <compilation debug="true" targetFramework="4.5" />
     <httpRuntime targetFramework="4.5" />
   </system.web>
  <system.serviceModel>
    <services>
  <service name="MultipayOnline.Service1" >
    <!--bindingConfiguration="SecurityByTransport"-->
    <!--<endpoint address="" binding="basicHttpBinding" bindingConfiguration="SecurityByTransport" name="base" contract="CardServiceLib.ICardService">-->

      <endpoint address="" name="base"
              behaviorConfiguration="restBehavior"
              binding="webHttpBinding"
              contract="MultipayOnline.IMultiPOService" >
      <identity>
        <dns value="localhost"/>
      </identity>
    </endpoint>
  </service>
</services>
<bindings>
  <webHttpBinding>
    <binding name="SecurityByTransport" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" >
      <readerQuotas maxDepth="2000000" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
      <security mode="TransportCredentialOnly">
        <transport clientCredentialType="Basic"/>
      </security>
    </binding>
  </webHttpBinding>
</bindings>


<extensions>
  <behaviorExtensions>
    <add name="CorsSupport" type="WebHttpCors.CorsSupportBehaviorElement, WebHttpCors, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
  </behaviorExtensions>
</extensions>


<behaviors>
  <endpointBehaviors>
    <behavior name="restBehavior">
      <!--<enableWebScript/>-->
      <webHttp helpEnabled="true"/>
      <CorsSupport />
    </behavior>
  </endpointBehaviors>
  <serviceBehaviors>
    <behavior>
      <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="true" />
      <dataContractSerializer ignoreExtensionDataObject="true" maxItemsInObjectGraph="123456" />
    </behavior>
    <!--<behavior name="customBehavior">
      <serviceMetadata httpGetEnabled="True" httpsGetEnabled="True"/>
      <serviceDebug includeExceptionDetailInFaults="True"/>
      <dataContractSerializer ignoreExtensionDataObject="true" maxItemsInObjectGraph="123456" />
      <serviceCredentials>
        <userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="MultipayOnline.CustomPass, MultipayOnline"/>
      </serviceCredentials>
    </behavior>-->
  </serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />


<protocolMapping>
  <add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
  </system.serviceModel>
  <system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<!--
    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.
  -->
<directoryBrowse enabled="true" />
<!--<httpProtocol>
  <customHeaders>
    <add name="Access-Control-Allow-Origin" value="*" />
  </customHeaders>
</httpProtocol>-->
  </system.webServer>


  <connectionStrings><add name="isMultiPayOnLineEntities" connectionString="..." providerName="System.Data.EntityClient" />    </connectionStrings>

Can you help me? Can I post something to you for make clearer the trouble?

1

There are 1 answers

0
user5702677 On BEST ANSWER

I think your port is closed .Check your IP and Port in http://ping.eu/port-chk/ if its status is closed then this msg will be shown . Plz open this Port to solve this problem..