locked
WCF service is not working RRS feed

  • Question

  • User-1230161102 posted

    Hi

    We have a server named Server1 in the DMZ where I hosted my wcf service. This server has also a public IP. I tested the service from office using wcftestclient.exe and it is working just find. When I tried to test from home again with wcftestclient.exe it is giving me a message says:

    There was no endpoint listening at http://server1/mciservice/Service.svc/MCIService 

    I am not able to figure out why it is pointing to Server1 not to the public IP although I am calling the service with the public IP. I have changed the base address in the web.config but the issue is still there.

    Here is the host web config :

    <configuration>
      <system.serviceModel>
    
        <behaviors>
          <serviceBehaviors>
            <behavior name="ServiceLibrary.ServiceBehavior">
              <serviceMetadata httpGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="false" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
    
        <services>
          <service behaviorConfiguration="ServiceLibrary.ServiceBehavior"
            name="ServiceLibrary.Service">
            <endpoint address="Service" binding="basicHttpBinding" contract="ServiceLibrary.IService">
            </endpoint>
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
            <host>
              <baseAddresses>
                <add baseAddress="http://10.10.5.8" />
              </baseAddresses>
            </host>
          </service>
        </services>
    
      </system.serviceModel>
    </configuration>

    ANd in the WSDL file I found again the name of the server not the IP.

    <wsdl:service name="Service">
    <wsdl:port name="BasicHttpBinding_IService" binding="tns:BasicHttpBinding_IService">
    <soap:address location="http://Server1/mciservice/Service.svc/Service"/>
    </wsdl:port>


    As long as Server1 is comming in the service address this address cannot be resolve and the service will not work.

    Please help me out

    Saturday, September 20, 2014 11:54 AM

Answers