HTTPS Client login help needed
#1
Posted 15 July 2012 - 09:04 PM
I have also tried using DOTNET calls and was at least able to get the login page returned but could not seem to trigger the login.
I switched to the HTTP Client VIs because they offered an alternate hope and I could at least see where to attach a cookie file with them (though a cookie file may not be the same as reserving space for a session cookie).
Any guidance would be appreciated!
#3
Posted 17 July 2012 - 06:19 PM
You are connecting to an SSL address (https) but not configuring the internet session to use SSL.I am trying to use the HTTP Client VIs to implement a version of the C# code found HERE. Unfortunately there are no NI examples of how the client VIs are to be used and my various attempts to string them together only seem to result in "Error 42" (LabVIEW: Generic Error) from the POST vi, rather than returning the headers and body text.
I have also tried using DOTNET calls and was at least able to get the login page returned but could not seem to trigger the login.
I switched to the HTTP Client VIs because they offered an alternate hope and I could at least see where to attach a cookie file with them (though a cookie file may not be the same as reserving space for a session cookie).
Any guidance would be appreciated!
Put a "ConfigSSL.vi" after the open.
Founder and general mischief maker on www.labview-tools.com.
SQlite aficionado and websocket zealot.
If it 'aint in LabVIEW, then you 'aint got a clue!
#4
Posted 17 July 2012 - 08:44 PM
Thanks for the suggestion and link. If I cannot get LabVIEW bent to my will then I'll consider it.You might consider checking out libcurl. They have a C binding, so you should just be able to drop CLNs and go nuts with it. I have had excellent luck in the past using libcurl (via php) to automate HTTP/HTTPS transactions.
Thank you! That did seem to help! I had tried using it (ConfigSSL.vi) at one time with this test code but had no luck and got scared away from it by all the inputs to the VI that I did not know how to use. After your suggestion I tried it again. My first try again yielded the error #42 but then I saw that the VI had a default-True boolean input telling it to check/use all those other inputs. I set the "verify server" input to false and the error went away and, based on the redirection and cookie I'm seeing, it appears like the login worked!You are connecting to an SSL address (https) but not configuring the internet session to use SSL.
Put a "ConfigSSL.vi" after the open.
![]()
Thank you!
#5
Posted 17 July 2012 - 09:02 PM
Yeah. If you are behind a natted router it will fail (as it cannot do a reverse DNS lookup to verify the server). But you've figured it out.Thanks for the suggestion and link. If I cannot get LabVIEW bent to my will then I'll consider it.
Thank you! That did seem to help! I had tried using it (ConfigSSL.vi) at one time with this test code but had no luck and got scared away from it by all the inputs to the VI that I did not know how to use. After your suggestion I tried it again. My first try again yielded the error #42 but then I saw that the VI had a default-True boolean input telling it to check/use all those other inputs. I set the "verify server" input to false and the error went away and, based on the redirection and cookie I'm seeing, it appears like the login worked!
Thank you!
Founder and general mischief maker on www.labview-tools.com.
SQlite aficionado and websocket zealot.
If it 'aint in LabVIEW, then you 'aint got a clue!
Also tagged with one or more of these keywords: https, dotnet, client, login, cookie
Software & Hardware Discussions →
LabVIEW (By Category) →
Calling External Code →
TCP with TLS (SSL)Started by bjones , 15 Nov 2012 |
|
|
||
Software & Hardware Discussions →
LabVIEW (By Category) →
Remote Control, Monitoring and the Internet →
Can HTTP Client VIs be used to download a file?Started by WMassey , 19 Jul 2012 |
|
|
||
Software & Hardware Discussions →
LabVIEW (By Category) →
Application Design & Architecture →
Multi-Client Network Communications ArchitectureStarted by BrentonLang , 28 Jun 2012 |
|
|












