Using VL.WebServer with browsers on other machines

Hi,

I’m trying to use the WebServer and I can use it by opening a local browser, but trying to access the server from another machine on the same network isn’t working yet.

What I have done so far:

  • Checked that Gamma can access other PCs on my network with OSC messages
  • Made sure I open Gamma as Admin so the elevated privileges of the Server allow me to use non-127.0.0.1 IPs.
  • Checked the Watson Webserver page for how things should be setup, and this is where I get confused and perhaps hit up against a limitation of the Nuget’s current implementation.

I took a little look at to the github readme but generally Web config stuff is over my head.

To test, run the patch as admin, it automatically uses you network IP address. Try to open the webpage from the same machine. If this works, try opening the webpage from a different one.

Web Server Gamma.zip (91.1 KB)

Thanks,

H

  • Specify the exact DNS hostname upon which Watson should listen in the Server constructor. The HOST header on incoming HTTP requests MUST match this value (this is an operating system limitation) - first thing to do.
  1. How should that be done with the parameters currently exposed?
  2. What does it mean?
    I’m not sure it counts when the URL is an IP address

I mean, it might not work correctly if you use an IP address. But I’m not sure.
And what about opening a port on your firewall etcetera?

Did that, tested with OSC (udp, but addmitedly not tcp)

It’s not about parameters exposed in gamma, but about networking conf of your PC

You can have a Network ID and Domain of your computer - I think those should be your hostname.
But I’m not really good in such things.

I’ve just checked, it was working when the listening IP was “computername.domain”. But I wasn’t doing a whole network setup, so I cannot guide you on that part.

1 Like

@Rayment thanks, I’ll see if I can get the setup right. Its the sort of thing I play with with very often though its useful info to retain. I share a network with another company, so this should get interesting…

For me it works (using an IP address) :

  • when the firewall is completely disabled
  • with a firewall rule that allows inbound traffic for System on Port 80

You can for example use WFC to manage the rules.

image

image

image

1 Like

Hm, I believe you can do this instead:
You may have to add URL ACLs, i.e. URL bindings, within the operating system using the netsh command:

  • Check for existing bindings using netsh http show urlacl
  • Add a binding using netsh http add urlacl url=http://[hostname]:[port]/ user=everyone listen=yes
  • Where hostname and port are the values you are using in the constructor
  • If you are using SSL, you will need to install the certificate in the certificate store and retrieve the thumbprint
  • Refer to https://github.com/jchristn/WatsonWebserver/wiki/Using-SSL-on-Windows for more information, or if you are using SSL

But again, not sure :-)

@bjoern this kind of worked, but only for one device. Once I tried to open it up to all device using that program, the old device remained happy but no others connected. Interesting program WFC but I found it only slightly less confusing than Win Defender Firewall’s default software. I keep getting the feeling I’m leaving a security hole somewhere :-?

@Rayment I also saw that on the page but I couldn’t understand what it meant. Its beginning to crystalize though. I’ll try the IP thing again tomorrow and then I might give it a shot and report back.

Thank you both!

H

Couldn’t get more than one device with the IP address, and adding the urlacl didn’t cut it. I’ll have to delve into the murky waters of domain settings, but I don’t have time at the moment.

Hi @Hadasi

I made a bit of research on the topic, and here are my findings:

  • what I was saying about IP/computername.domain is not really valid. You can use there an IP address. And the advantage of using computer domain is independence from IP which can be changes at some point.
  • If you run cmd as admin and enter this command:
NETSH http add urlacl url=http://[hostname]:[port]/ user=everyone listen=yes

it will allow to use WebServer without admin rights. What it dose is whitelisting this hostname and port on your computer for listening of any user. You have to do it for .net and windows.
It is important to terminated the URL with a ‘/’ - make sure you write it correct.

  • Still the Firewall can block the port if your pc is not in correct domain. If so, you need to exclude this port in Firewall settings.

I have tested it on my side - it works locally and from others PCs.

1 Like

Right, so here’s an update. My laptop doesn’t seem to like Gamma at the moment but my workstation seems happy enough.

Opening Gamma in Admin mode allows me to specify the computer’s network IP address and other local devices can find the webpage I host.

The strange thing is that my mobile phone can’t find the webpage on the network, but a test phone that I use does. I’ll look into what that is but this Nuget works correctly with IP addresses. It will probably need an option do it can be configured with different domain based urls, but it works pretty well.

Thank you both @bjoern and @Rayment

just stumbled upon the fact that the “everyone” parameter is language specific!!§"$! so in german you actually have to write “jeder” instead.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.