How can I determine an un-used port to start a WCF ServiceHost to host a localhost web server on?
I'm currently starting my service up statically on http://localhost:XXXX where XXXX is a static value in my code.
I'd like to replace the XXXX with a GetUnusedPort() call...
Any thoughts?