I've created a windows service using Owin and topshelf.
the application is a WebAPI that listens on port 9000 and I have allowed this port in my firewall rules.
when I executed the .exe file on windows server 2008 I can use it locally(localhost:9000)
but when I try to access it from other machines, I get this error message:
HTTP Error 400. The request hostname is invalid
what am I missing? please help.
this solved my problem, which might be super obvious to you, but not as much to me.
instead of using this code:
WebApp.Start("http://localhost:8080/");
I had to use this:
WebApp.Start("http://*:8080/");
of course one shouldn't forget to open the port in the firewall too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With