04-12-2017 05:31 PM
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!
05-03-2017 10:03 AM
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