开发者

Issues Deploying a WCF service

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 timeo开发者_StackOverflow社区ut) 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜