I have a WCF service with net.tcp and http server bindings.
Web.config file looks like this
<system.web>
<compilation debug="false" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="tcp_Unsecured" portSharingEnabled="true">
<security mode="None" />
</binding>
</netTcpBinding>
</bindings>
<services>
<service name="MarketFeedServiceLibrary.Service1">
<endpoint address="net.tcp://localhost:808/MarketFeedService/Service.svc/mexTcp"
binding="mexTcpBinding" bindingConfiguration="" name="mexEndPoint"
contract="IMetadataExchange" />
<endpoint address="net.tcp://localhost:808/MarketFeedService/Service.svc/tcpService"
binding="netTcpBinding" bindingConfiguration="tcp_Unsecured"
name="dataEndPoint" contract="MarketFeedServiceLibrary.IService1" />
<endpoint address="http://localhost:80/MarketFeedService/Service.svc/basicHttp"
binding="basicHttpBinding" bindingConfiguration="" name="httpDataEndpoint"
contract="MarketFeedServiceLibrary.IService1" />
<endpoint address="http://localhost:80/MarketFeedService/Service.svc/mex"
binding="mexHttpBinding" bindingConfiguration="" name="httpMexEndpoint"
contract="MarketFeedServiceLibrary.IService1" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="false" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
/>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
I have hosted the service in IIS in local PC, if I browse in IE using the address
"http://localhost/MarketFeedService/Service.svc"
, I get metadata info as below
But if I host the same WCF Web Service in IIS on VPS Server (Windows Server 2008 IIS 7.5), with same address, I get following error,
Also I can add Service Reference of Local Hosted Service, but if I try to add Service Reference of Server with path "net.tcp://IPAddress/MarketFeedService/Service.svc", I get following error
The message could not be dispatched because the service at the endpoint address 'net.tcp://IPAddress/MarketFeedService/Service.svc' is unavailable for the protocol of the address.
N.B.
- Net.Tcp Port Sharing Service, Net.Tcp Listener Adapter are turned ON
- WCF Http and Non-Http Activation are installed and enabled.
- http and net.tcp protocols are enabled for Default Web Site as well as for the application.
Thank you very much in advance.