i have a WCF service host in IIS8 and I want to use a net.tcp binding.
I have this configuration:
Web.config:
<service behaviorConfiguration="MyBehavior"
name="DecryptService.EmailCenterDecryptTCP">
<host>
<baseAddresses>
<add baseAddress="net.tcp://XX.XX.XX.XX:808/VirtualFolder/Service.svc" />
</baseAddresses>
</host>
<endpoint address=""
binding="netTcpBinding"
bindingConfiguration="portSharingBinding"
name="MyServiceEndpoint"
contract="ServiceNamespace.IService">
</endpoint>
<endpoint address="mextcp"
binding="mexHttpBinding"
bindingConfiguration=""
name="MyServiceMexTcpBidingEndpoint"
contract="IMetadataExchange" />
</service>
When I try to consume the service in the same machine as IIS8 with the following configuration works fine:
<client>
<endpoint address="net.tcp://YY.YY.YY.YY:808/VirtualFolder/Service.svc"
binding="netTcpBinding" bindingConfiguration="MyServiceEndpoint"
contract="ServiceReference1.IService" name="MyServiceEndpoint" />
</client>
YY.YY.YY.YY is the local IP of machine but when I try to consume the service in another machine changing YY.YY.YY.YY to external IP of the machine (ZZ.ZZ.ZZ.ZZ) that runs IIS8 I get the following error:
There was no endpoint listening at net.tcp://ZZ.ZZ.ZZ.ZZ/VirtualFolder/Service.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
Any Ideas? Thanks and sorry for my bad English
EDIT:
I made a console application running a ServiceHost replacing IIS and with this configuration it works over internet
var svh = new ServiceHost(typeof (Service));
svh.AddServiceEndpoint(typeof (ServiceNamespace.IService), new NetTcpBinding(SecurityMode.None), "net.tcp://serverLocalIp:808");
svh.Open();
Console.WriteLine("SERVER - Running...");
stopFlag.WaitOne();
Console.WriteLine("SERVER - Shutting down...");
svh.Close();
Console.WriteLine("SERVER - Shut down!");
Any idea whats wrong with IIS running the same service over internet? locally works. Thanks