Reputation: 1336
I was wondering if anyone could help - I have a local network (wireless, my computer and a laptop connected to it) and I've tried hosting a rest service developed with ServiceStack on it. If I run the application on the computer (a console app for now) and try to access the service using the machine IP or 127.0.0.1 it works fine - but if I try and access it from the laptop, using the computer's IP it simply stalls, and the REST service is never called.
I've tried turning off all firewalls etc, running everything in Admin mode but still nothing.. am I missing something simple to get this working?
Any help is much appreciated!
Some of the code samples (My AppHost class is inheriting from the AppHostHttpListenerBase)
restServiceToStart.Value.Init ();
restServiceToStart.Value.Start (_HostUri);
where for my main machine, the _HostUri is set to "http://my-ip-address:8080/"
Upvotes: 3
Views: 2092
Reputation: 143339
You haven't listed the code you use to start your AppHost (please be descriptive when asking questions) so I'm going to assume you're not listening to http://*:{port}/
, e.g. from the Self Hosting wiki:
var appHost = new AppHost();
appHost.Init();
appHost.Start("http://*:1337/");
The *
wildcard says to listen on every local network interface.
Upvotes: 4