03-28-2018
02:31 PM
- last edited on
03-14-2019
02:18 PM
by
NIadmin
During the tutorials, it is mentioned that WebVI's created with NXG can be hosted by the NI Web Server or by any other web server. I assume that is true if the WebVI's do not include Skyline APIs. E.g. if we want to use Skyline Tags, then I am guessing that we need to install the NI Web Server. Is that correct? I just did such an install, and I did not see any way to install JUST Skyline support. E.g. if we are going to use a different web server, can we install something such that the Skyline API works? Or can we host the html code on the other web server, and have the NI Web Server installed on the same machine just to handle the Skyline API?
Thanks,
DaveT
03-29-2018 01:33 PM
@Dave_Thomson
I assume that is true if the WebVI's do not include Skyline APIs. E.g. if we want to use Skyline Tags, then I am guessing that we need to install the NI Web Server.
This is correct. The Skyline Data Services are applications running on the NI Web Server and we don't have a way of installing that support on another web server.
03-29-2018 04:56 PM
Thanks, Brandon.
Just to clarify, though: If you do use Skyline, then you need the NI Web Server installed on the server machine. Does that mean that your htlm also MUST be hosted by NI Web Server? I imagine you could point your browser to another web server (Apache?) on port 80, then point your Skyline tags to NI Web Server at some other port. Not sure you would ever want to do that, but I'm just trying to understand where the lines are.
DaveT
03-30-2018 09:02 AM
If you are writing your own web service/application, you should be able to create your application, and then use the Web Service APIs to call into the NI Web Server like you mentioned.
Also, as a side note, NI Web Server is an Apache-based server. I'm not sure if you'd run into issues using two separate Apache servers side-by-side but if you could get that working, or if you used another server, you should be able to use the Web Service APIs like I described above.
03-30-2018 11:20 AM - edited 03-30-2018 11:22 AM
In general if you are creating a WebVI or custom web application that uses any of the Skyline APIs, I would highly recommend hosting it from the same NI Web Server that is providing the data.
You technically, can host the web application on a different web server on the same machine or completely different machine, but you will have to enable different CORS options depending on which one you choose. In addition, it can be very difficult to get the authentication and authorization support working if you are hosting the web application on a different server.
Also, here is an example on how you can add a custom web application or WebVI to the main SystemLink group of applications.