I am trying to host some WCF RESTful services from my computer for use by computers on the local network. I have no experience with WCF, and I'm pretty much a newbie when it comes to that. I created a very basic, truncated console application to see if I could make it work.
static void Main(string[] args) { Uri httpUrl = new Uri("http://localhost:8090/"); var host = new WebServiceHost(typeof(TestClass), httpUrl); var binding = new WebHttpBinding();
Here's the service code:
[ServiceContract] public interface ITestClass { [WebGet] [OperationContract] string TestMethod(); } public class TestClass : ITestClass { public string TestMethod() { return "SUCCESS"; } }
From a browser on my local computer, I can send a simple receive request and receive
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">SUCCESS</string>
However, it seems that I cannot send this service from any browsers on my home network when I type http://<service machine IP>:8090/testing/testmethod .
Can someone tell me what configuration is missing so that the service is visible to other computers on my local network without using a DNS server?
c # rest wcf
Duck jones
source share