From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

Using myRIO as webserver

Hi everyone,

 

i'm using myRIO as webserver.It writes into a txt file the value of a sensor and by a script written in javascript in a webpage, i can read the value from the website.

 

Since myRIO is connected to a 4g modem(with high public ip) i can read the value everywhere from my smartphone.

 

The problem is that when i type from my browser "http://IP-myRIO/files/home/lvuser/natinst/bin/file.txt" the browser ask me the credentials and i read the value, but when i open the webpage which reads the txt file, it doesn't work because of the credentials.

 

i need the webpage because it reads the value dynamically without refresh the page.

 

how can i remove the credentials?Should i put the txt file into www folder?

 

thank you!

0 Kudos
Message 1 of 2
(3,726 Views)

Hello,

this is an expected behavior. Writing the myRIO address in that way, you're asking to access to RIO Hard Disk through WebDav protocol (not HTTP methods as web service does).

Here you can find the documentation to add static content to webService:

http://zone.ni.com/reference/en-XX/help/371361N-01/lvhowto/ws_static_content/

 

Bye,

Teo

0 Kudos
Message 2 of 2
(3,590 Views)