06-10-2010 06:14 PM
Currently, I am controlling a product that my company develops via Internet Explorer commands. I know that I can use HTTP functionality in LabView to send commands to Internet Explorer. However, when I developed a simple VI to test this functionality, I ran into authorization issues. When I first access the webpage manually, a dialog box pops up requesting a username and password. Even if I check the box "Save My Password" when I run the LabView VI, it still has authorization issues.
I have searched around for an answer on how I can deal with the dialog box and enter in a username and password, but to no avail. I'm not even sure I can do this with LabView. For reference, here is the authentication dialog box that pops up:
It is very important that I do not get rid of the username and password box, as that would pose a security risk. I need to be the only person accessing the web page.
06-11-2010 05:53 AM
Hi BlueShift,
you can send the authentication from your vi. See this link as a reference. Do you handle all this with TCP/IP or are you using ActiveX?
Mike
06-11-2010 06:40 AM - edited 06-11-2010 06:42 AM
This Twitter post VI is an example of standard LabVIEW code using basic HTTP authentication.
Another option might be the usage in the form: http://user:password@websiteURL
It is very important that I do not get rid of the username and password box, as that would pose a security risk. I need to be the only person accessing the web page.
In that case I would not rely on basic authentication. HTTPS is better in such options. But I don't know a HTTPS toolkit out of mememory.
Ton
06-14-2010 02:37 AM - edited 06-14-2010 02:42 AM
TCPlomp wrote:This Twitter post VI is an example of standard LabVIEW code using basic HTTP authentication.
Another option might be the usage in the form: http://user:password@websiteURL
It is very important that I do not get rid of the username and password box, as that would pose a security risk. I need to be the only person accessing the web page.
In that case I would not rely on basic authentication. HTTPS is better in such options. But I don't know a HTTPS toolkit out of mememory.
I do , eventhoug it is in a prelimenary state.
http://lavag.org/topic/12346-labview-network-library-to-support-ssl-ping-and-ipv6/
Just some clarification: If the authentification is done using HTTP Basic or some other HTTP authentification AFTER the SSL connection has been established this library will work. If the authentification is part of the SSL handshake itself which is sometimes used then it won't work. I have not even started to implement SASL into the SSL handshake in that library.
01-31-2015 05:00 AM
01-31-2015 06:16 AM - edited 01-31-2015 06:17 AM
The most simple way to handle this are the HTTP Client VIs in newer LabVIEW versions. They can handle authentication as well as proxy servers, although the interface hides a lot of the inner workings which can make it a little hard to figure out how to use them correctly, especially if the (proxy) server is not entirely standard compliant.
The problem with authentication and proxy servers is likely that the authentication credentials that you provide in the HTTPClient.lvlib: OpenHandle are applied to the connection with the proxy server, not the connection between the proxy server and your end server. I'm not really sure how that should be handled and think that it also depends on the used proxy server if and how it could work.