From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to publish in the web with NXG

Solved!
Go to solution

Hello,

I wan't to publish web application in internet . 

I downloaded the project from here :

http://www.ni.com/white-paper/54116/en/

and i tried to follow the steps in the video: 

https://www.youtube.com/watch?v=v81cUhdLeIc&t=6s

It works in my PC but when i try to run the web application from another pc in the same Network it Don't work . 

So how to do that in my network , and from another network ? Help me please

 

Thank you ,

Message 1 of 12
(4,432 Views)
Solution
Accepted by topic author taoufiksmires

Hi taoufiksmires,

 

Have you performed the following steps to host the application on the NI Web Server?

 

1. Set up the NI Web Server: Windows Start Menu >> Search "NI Web Server Configuration" >> Follow through the steps, making sure you allow for remote connections from other clients. See my sample configuration below; take note of the server URI as this will be important to access the application.

image.png

2. Copied the build output of the web application to the NI Web Server directory:

     A. You can find the build output in NXG by double-clicking WebApp.gcomp >> 'Document' tab on the right >> 'Build' >> Look at the 'Output' directory

     B. Copy the entire directory to the NI Web Server directory: C:\Program Files\National Instruments\Shared\Web Server\htdocs\

image.png

3. Navigate to the URL from the remote machine. An example of this, if you configured https, and have a folder 'myApplication' within the NI Web Server directory would be: https://<server URL>/myApplication/main.html

image.png

 

 

Message 2 of 12
(4,382 Views)

I would also temporarily disable any firewall on the machines while you do your first test.

I was being blocked when I first attempted a test of similar code over a corporate LAN.

 

0xDEAD

Message 3 of 12
(4,370 Views)

Hi I tried to publish in the web with NXG. I have followed the steps from this forum.But I haven´t got the web services works for my web page. If I follow the same steps locally way , the web page and web services work perfectly. I don´t know where the problem is. 

 

Firewall for the web server and clients computer are disable. 

The first computer runs the web service and NI Web Server. 

The second computer queries the web page. 

 

Please Help me. 

0 Kudos
Message 4 of 12
(3,833 Views)

I have just solved the problem. I changed the port number for web service and web page is loading data from the web service. 

0 Kudos
Message 5 of 12
(3,789 Views)

I could see the web app in the browser with my IP, but I could not see it from the internet. How it works? would you please help me how step by step publish it on internet by using my internet IP?

0 Kudos
Message 6 of 12
(3,182 Views)

Hi. You should find out your public ip. Check your public ip visiting this website https://www.whatismyip-address.com/?check

 

0 Kudos
Message 7 of 12
(3,160 Views)

Thank you for your reply.

I've used that IP, but it is working from my laptop that I have the NI web server, but It doesn't work from another computer from the internet. Also, I set the port forwarding in my router to my laptop.

0 Kudos
Message 8 of 12
(3,152 Views)

I think your Ni we server is not set up properly. You must include your pubic ip and establish a port for the ni web server. I recommend you use a port that is not 80.  

Message 9 of 12
(3,133 Views)

Thank you. It's working with a port other than 80!

0 Kudos
Message 10 of 12
(3,125 Views)