11-07-2021 02:49 PM - edited 11-07-2021 03:13 PM
I started tinkering with setting cookies in order to recognize requests from a browser that succesfully logged in. However, I get the strangest error when I want to set the cookie:
Error -67309 occurred at an unidentified location
Possible reason(s):
LabVIEW: (Hex 0xFFFEF913) LabVIEW Web Services: Unsupported node for NI Web Server.
I can't imagine that NI web server does not support the session vi's. A thought maybe the cookie is being blocked by the client browser, but that is not the case.
I did figure out that this VI resides in the application web server subpalette. So do I have to switch over to the application web server for something as basic as cookies? And besides: how am I ever going to properly use the application web server that requires the long unsupported Silverlight browser plugin?
12-10-2021 03:14 PM
Great question.......
12-15-2021 03:34 AM
I am currently not using the application web server. I use the NI web server and figured out how to manually set cookies.
12-17-2021 06:09 PM
Would you mind sharing an example?
Thanks
M
11-12-2022 11:45 AM
I hope this will help somebody
Example project is attached.
The idea is: check cookies. If this vi returns an error, it means that session does not exist. So I open the login page and if successful, the user can get the data. And the session exists until the browser will be closed.
Here is only one problem. The login VI changes address from "ted data" to "get access". May be anybode knows how to fix it?
11-14-2022 04:10 AM
The VI Snippet's by @Artem.SPb will only work for the the "old" application web server not with the new NI Web Server.
I'm currently working on a project that is using the NI Web Server and also needs to work with Cookies and Sessions for connected Clients.
There might be some other solutions but for me this is working perfectly fine.
11-14-2022 10:21 AM
@Jens_S wrote:
The VI Snippet's by @Artem.SPb will only work for the the "old" application web server not with the new NI Web Server.
I'm currently working on a project that is using the NI Web Server and also needs to work with Cookies and Sessions for connected Clients.
Thanks for the addition.
You're right, my first option doesn't always work, I figured it out myself in tests on different machines. And it's not just the "old" server. So I now create cookies as shown in my last snippet, and then I check in much the same way as it is shown in yours.