LabVIEW Web UI Builder and Data Dashboard

cancel
Showing results for 
Search instead for 
Did you mean: 

HTTPS Get String

Is it possible to use HTTPS (vs plain HTTP) in the HTTP GET String module?  

I have configured my computer to connect to the Web UI itself via HTTPS, but when I try to fetch data via an embedded HTTP GET call, it returns a 404 not found error for any URL beginning with https://address.

(I have confirmed https://address is available via browser).  It looks like maybe the HTTPS GET module does not support SSL?

 

 

0 Kudos
Message 1 of 7
(8,454 Views)

Hi Matt,

 

I do believe that HTTPS is supported. I could not find anything explicitly stating that the HTTP GET functions or not with SSL but here are a couple of resources on the matter. 

 

http://digital.ni.com/public.nsf/allkb/87CC7C84AAB73BA886256DA400662672?OpenDocument

 

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

 

https://decibel.ni.com/content/docs/DOC-5941

 

This last link should help you to make sure everything is set up correctly. Le me know if this helps or if you have any more questions. 

 

 

Ryan
Applications Engineer
National Instruments
0 Kudos
Message 2 of 7
(8,440 Views)

One thing to note is that Silverlight / Web UI Builder doesn't have any equivalent of the click through warning you might get when using self signed certificates.

When you access your web service over HTTPS in a browser, and you get a Certificate Error / broken SSL lock icon in your address bar, or something like that, this means that connecting via Web UI Builder will fail also. (The error message is the generic 404 message, rather than anything specifically about HTTPS).

 

To resolve this, if you get an official / non-self-signed certificate and get that all set up, that should work. Or, on the machines using Web UI Builder, if you trust your self-signed cert (install it into the root certificate store), that should also work.

Message 3 of 7
(8,435 Views)

Ryan, thanks for your response.  But I think we are talking about two separate things.  You show how LabView web *server* can do HTTPS.  What I want to do is have the "HTTP GET" *client* in a WebUI fetch HTTPS data from a third party web server.  Per the WebUI documentation, this is supported:

 

Can applications created using LabVIEW Web UI Builder applications communicate with non-LabVIEW web services?

Yes, LabVIEW Web UI Builder can communicate with both LabVIEW and non-LabVIEW web services. ... With non-LabVIEW web services, the user must implement the low-level HTTP and XML programming required to call the web service and parse the XML response.

 

Attached is a very simple example of a VI that works for HTTP but fails for HTTPS.  (The same URL works in a browser for both HTTP and HTTPS).  In this simple example the web server is Tomcat running on localhost.

 

 

 

Download All
0 Kudos
Message 4 of 7
(8,434 Views)

Thanks Malcolm.  I have already tried getting a certificate setup, and it seems to make my browser happy (no complaints about bad certificate), but no-go with WebUI.  But maybe that is the path to a solution, I will keep pursuing that.

0 Kudos
Message 5 of 7
(8,433 Views)

A couple more questions -

- In Internet Explorer, does https://localhost/hello.txt load fine (without a certificate error)? Silverlight / Web UI Builder basically use IE's networking stack, so I wanted to doublecheck that everything seems fine in IE.

- Does https://localhost/clientaccesspolicy.xml show you a valid policy file? (You should see the same thing as http://localhost/clientaccesspolicy.xml, and the file should contain the following XML (among other things):

<allow-from http-request-headers="*" http-methods="*">
    <domain uri="https://*/>
    <domain uri="http://*/>
</allow-from>
Message 6 of 7
(8,416 Views)

Malcolm, 

 

Thanks to your help I have it mostly working.  The clientaccesspolicy.xml files are all OK I think.  I am developing on a Mac, so I had to connect remotely from a PC to try out your IE suggestion (with revised cert to IP-address).  This complained at first about my self-signed certificate, but after clicking through as trusted on PC, the Web UI HTTPS-Get worked!

 

Still confused why my Mac doesn't like it, but most of my users can live with PCs, and this narrows down the issue considerably.  (One clue is even though I install cert on the Mac, Chrome insists on displaying a broken-icon about it being self-signed.  Firefox and Safari are happy).

 

Thanks!

Matt

 

0 Kudos
Message 7 of 7
(8,409 Views)