WCF via IIS problem IP address
I made a WCF Service on Duplex Protocol. It's works correctly and fine. But I have only one small problem:
here is a IP string where can I start an test it: http://localhost:5659/Service.svc
But when I choose my real IP address on my local machine (where localhost existed): http://93.4.18.3:5659/Service.svc
I can't connet yet. Also I can't connect from other addresses using my real IP address. May be something wrong in my web.config ?
Btw - my firewall if switched off.
Here is my config:
<extensions>
<bindingElementExtensions>
<add name="pollingDuplex" type="System.ServiceModel.Configuration.PollingDuplexElement, System.ServiceModel.PollingDuplex" />
</bindingElementExtensions>
</extensions>
<b开发者_JAVA百科ehaviors>
<serviceBehaviors>
<behavior name="GameStreamServiceBehavior">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceThrottling maxConcurrentSessions="2147483647" />
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<customBinding>
<binding name="pollingDuplexBinding">
<binaryMessageEncoding />
<pollingDuplex maxPendingSessions="2147483647" maxPendingMessagesPerSession="2147483647" inactivityTimeout="02:00:00" serverPollTimeout="00:05:00" />
<httpTransport />
</binding>
</customBinding>
</bindings>
<services>
<service name="WcfServer.Service" behaviorConfiguration="GameStreamServiceBehavior">
<endpoint address="" binding="customBinding" bindingConfiguration="pollingDuplexBinding" contract="WcfServer.IService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
You should check the Site bindings in IIS. It is possible that the HTTP binding on port 5659 is configured for a specific host header ("localhost") or a specific IP address (not 93.4.18.3) only. That would explain the behavior you're getting.
精彩评论