0

I'm currently attempting to add a simple WCF-based web UI to an existing application, so that certain aspects can be remote controlled via any device on the same LAN with a web browser. (from a phone or tablet 30ft away via WiFi, for instance) This works for the most part, from the same machine, at least, but if I try and connect from any other device, it just times out.

WebHttpBinding binding = new WebHttpBinding();
binding.TransferMode = TransferMode.Streamed;

WebHttpBehavior behavior = new WebHttpBehavior();

WebServiceHost host = new WebServiceHost( typeof( Service ), new Uri( "http://localhost:8000/[REMOVED PRODUCT NAME]" ) );
host.AddServiceEndpoint( typeof( IService ), binding, "" ).Behaviors.Add( behavior );
host.Open();

This is self-hosting from C# on Windows 7 64 bit.

I have added a firewall exception and the program to the netsh ACL.

I can ping the host device from the client device.

I can still get to it from the host device if I go via LAN IP rather than localhost.

I have added a parameterless constructor and finalizer to the Service class which print to Console so I can tell if and when it is being constructed by WCF. This happens when accessed locally but not from another device on the same LAN, suggesting the problem lies with the binding to me.

Thank you.

jameswilddev
  • 582
  • 7
  • 16

1 Answers1

0

Resolved; the issue is down to the router in use seemingly firewalling users from one another. Using another router or ethernet cable works.

jameswilddev
  • 582
  • 7
  • 16