2
votes

We're trying to deploy a web site that uses a WCF service - everything worked in test - but when we put it live (pointing to the same WCF service) via an external facing IP it stopped working.

When we paste the url into a browser it displays the basic web page - but when we try it via the app it give us an error (see below)

config section ...

<client>
  <endpoint address="http://123.321.123.321:8731/N3/WebsiteIntegrationService/" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IWebsiteIntegrationService" contract="AccessService.IWebsiteIntegrationService" name="WSHttpBinding_IWebsiteIntegrationService">
    <identity>
      <userPrincipalName value="myname@mydomain" />
      <dns value="webservername"/>
    </identity>
  </endpoint>
</client>

error ...

Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at System.ServiceModel.ICommunicationObject.Close(TimeSpan timeout) at System.ServiceModel.ClientBase1.System.ServiceModel.ICommunicationObject.Close(TimeSpan timeout) at System.ServiceModel.ClientBase1.Close() at System.ServiceModel.ClientBase`1.System.IDisposable.Dispose()

and ..

The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.
System.ServiceModel.CommunicationObjectFaultedException Void HandleReturnMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessage)
Server stack trace:
at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)

... but the same service is still working via our local test app - we can even use the external facing IP.

Can anyone point me in the right direction please?

1
Can you explain what you mean by the port forwarding, is 123.321.123.321 the actual machine or a proxy? What is your security configuration for the service?Dominik
We've got our hoster to open the right port so we're not using the port forward anymore - but we're still having problems.Andy Clarke
Do you have RDP access to the server you´re deploying the site to? Can you call the service URL from there via browser?Dominik

1 Answers

0
votes

The endpoint address should be the one at which the service is installed (i.e. use the port on the machine, not the external port defined in the router's nat table).

I had a similar situation with a web farm where the external calls are made through https but internally the load balancer calls the actual machine in the farm through http. For this to work, all config settings on the service (behaviors, endpoint) are using http addresses because that's the way they are being called.