LabVIEW Web Development Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Publish LV webservice to a public page

Does anyone have some insight on how to publish a web service to public a webpage not just an ip address on the same network. 

Let me give you some background,  I am trying to develop a standalone Application that will include a web service that will publish a front panel image to a web site.  I have the web service made and will include the NI example  it was  made from in the attachments. What I want is to be able to see it outside my network.   I have a dns address and my router is configured to forward from a certain ip address, for the purposes of this discussion lets call that address 127.10.10.5, to the domain Name.  I don't know if it is possible to do this native to LabVIEW but i am hopping it is. 

Does anyone know that the next step?

0 Kudos
Message 1 of 5
(6,319 Views)

From the machine hosting the Web service go to https://www.whatismyip.com.  This will give you the public IP of your machine (actually its likely your router).  From there you'll want to map/port forward the IP and web server port of your machine within your private subnet to a port on your router. When this is done hitting that IP+port from a Web browser should show whatever the Web server on your machine within the private subnet.

The whatismyip IP address is what you assign as your A Record within your DNS provider so your DNS maps to your Web server.

OK, so this is pretty high level and there are likley some details glossed over depending on your router, DNS provider, and knowledge of networking.  But hit us up with follow up questions!

Mark
NI App Software R&D
0 Kudos
Message 2 of 5
(5,357 Views)

OK points of clarification.  In my Router setting I set what port to foreword from or to?

port forwarding.PNG

so is the Pubic port the ports I set during the build setup process in labVIEW? Also, is IP Address the address of my machine on which the web service is running?  assuming that is all correct then also assuming I set up my dns correctly then I would need to format my url as "dns.blogsite.org:port/webservicename/webresource"? where port is in the range specified above

0 Kudos
Message 3 of 5
(5,357 Views)

In the settings, you would forward TCP with both the public and private port set to what you configured in the application build spec in LabVIEW (default 8002).

The IP address is the local IP address of the machine running the application with the web service (probably something like 192.168.x.x or 10.2.x.x). You can get that IP address by opening the Network and Sharing Center, clicking on the connection (such as Local Area Connection), and then the Details button.

You also need to open that port in the machine's firewall. By default, Windows should bring up a dialog the first time you run the application asking to open the firewall.

As long as the DNS record is set to your public IP address and the forwarding is set up, then yes that URL looks like it should work.

Message 4 of 5
(5,357 Views)

Thanks for all of your help guy that was exactly the steps I needed to take.  Kudos all around. 

Message 5 of 5
(5,357 Views)