CassiniDev only listens on localhost

Oct 18, 2014 at 12:30 PM
I've tried to start a new CassiniDev server through the CassiniDevServer class. Works fine on localhost, but if I deploy my code on another machine, I cant reach it from other than localhost. I've tried specifying a custom hostname as a parameter to the StartServer method, but that doesn't seem to work. What could be wrong here?
Oct 30, 2014 at 4:21 PM
Edited Oct 30, 2014 at 4:21 PM
Cassini is designed as a test server for debug and development so one of its major limitations is that it can't serve pages remotely. In the past, I've used a simple pass-thru proxy with good success to run demos on Cassini to users in meetings etc. This approach can certainly work, from what I saw in Cassini source it was non-trivial to remove this built-in restriction.

Hope that helps!
Oct 30, 2014 at 4:30 PM
Thanks a lot. Could you maybe point me in direction towards where to change this in the source?
Nov 10, 2014 at 8:44 PM
To re-iterate: I WOULD NOT try to change Cassini source on this point the changes are in many places. Just use a proxy which is 100% external to Cassini, listen on a port of your choosing and connect to Cassini on localhost.

If you want something more robust, I recommend IIS (possibly express) or another web server.
Nov 10, 2014 at 9:55 PM
Turns out that Cassini already supports other than localhost. You just need to listen to any IP address like this:
var server = new Server(port, "/", serverPath, IPAddress.Any);