WCF service running at localhost: 4040

I hope this is a quick question. I have a WCF service running on IIS port 4040. I added the following headers for this service

4040 (no-load balance)

4040 localhost

So locally I can refer to this service as http: // localhost: 4040 / service.svc as well as the fully qualified domain name. This is not a problem for all services on this machine, I can link to everything on localhost: 4040

The problem occurs when I try to access it from another server (since we have other applications that need to consume the service)

I am getting a 404 error and wondering if the default service for checking on localhost loopback (127.0.0.1) is not running, so it cannot be accessed.

The end point is defined as such:

 <service behaviorConfiguration="ClaimChaseBehavior"
          name="Modules.EClaims.ClaimChase">
    <endpoint address=""
              binding="basicHttpBinding"
              contract="Domain.EClaims.DataInterfaces.IClaimChase" />
    <endpoint address="mex" binding="mexHttpBinding" 
              contract="IMetadataExchange" />
 </service>

      

Note. I am not specifying an address. The reason for this is to allow us to have a common config file (we are trying to bypass the definition of domains / addresses of machines and hence multiple configurations)

Is there a way to make WCF default for device IP instead of loopback connector without specifying the actual domain name

Hope this makes sense

Hello

Richard

+2


source to share


2 answers


When you host your service in IIS, the address of the service is determined and controlled by the location of your * .svc file - you cannot override this by specifying base addresses or an explicit address on the service endpoints.

The service address will always be:



http://machinename/VirtualDirectory/YourService.svc

      

Mark

+1


source


Check your web config. Did you clarify that the service address is localhost?

EDIT:



Second, it looks like a firewall issue, is port 4040 blocked by the local firewall?

0


source







All Articles