How do i allow the HttpListener in vb2005.net to allow outside access?
For testing purposes i have set it up to use the same ports as my webserver uses so there are no firewall issues.
the prefixes are set up to take the localhost on port 80
the realm is unset
AuthenticationSchemes = Net.AuthenticationSchemes.Anonymous
it works just fine locally on the machine, but cant be reached by web browser on any other machine on my network
The problem is probably due to the fact that a remote client will send the request with a host header of ‘yourmachinename’, and not ‘localhost’ or the IP address.
Unlike IIS, which handles localhost and the local machine name, and the IP all the same (unless you explicitly set host headers), the HttpListener is particularly picky about the request it’ll actually respond to.
Set the listener up so that it’s listening for requests on ‘yourmachinename’ and remote clients should then be able to talk to it. Then, for local testing, make sure you change the host from localhost, because that’ll probably no longer work.