Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
36 ratings:
 2.83 out of 5   

Using WebDAV to Transfer Files to Your Real-Time Target



Primary Software: LabVIEW Modules>>LabVIEW Real-Time Module
Primary Software Version: 2013
Primary Software Fixed Version: 2013
Secondary Software: N/A
Hardware: CompactRIO

Problem:
How do I configure a WebDAV (Web Distributed Authoring and Versioning) server and use it to transfer files to and from my real-time target?

Solution:
Real-Time targets support WebDAV, a protocol that enables you to create, change, and move files on your target securely and effectively.  WebDAV is a good alternative to FTP (File Transfer Protocol) as it allows for encryption and more secure data transfers.  WebDAV is an extension of HTTP, and is supported on Windows, OS X, and Linux operating systems. To use WebDAV, you must install WebDAV support on your target and configure a WebDAV client on your development computer.

Table of Contents:

WebDAV Security
Installing WebDAV and SSL Support on Your Target
Configuring WebDAV
Using Third-Party WebDAV Clients
Tranferring Files Using WebDAV
Using the WebDAV VIs
Using WebDAV over USB

WebDAV Security


One of the principal benefits of WebDAV is improved security over the FTP server. The WebDAV server integrates with NI-Auth, the authentication service used by your target to validate login credentials. To take full advantage of WebDAV security, complete the following steps:
  1. Set a password for your target. For information on setting a password, refer to the Logging in to your System topic of the Measurement & Automation Explorer Help, available by selecting Help»MAX Help from Measurement & Automation Explorer (MAX).
  2. Enable SSL on your target and specify an HTTPS connection during WebDAV configuration. If you do not enable SSL or specify an HTTPS connection, the WebDAV client transfers files without encryption.

Secure Alternatives to WebDAV


National Instruments recommends you use WebDAV with SSL enabled instead of using the FTP server. In addition to WebDAV, you also can use the following secure options to access files on your target:
  • NI Web-based Configuration & Monitoring
  • Serial connection (NI Linux Real-Time targets only)
  • Remote shell, such as SSH (NI Linux Real-Time targets only)

Installing WebDAV and SSL Support on Your Target

(NI Linux Real-Time) You do not need to complete any steps to install WebDAV and SSL support. These components are enabled by default on NI Linux Real-Time targets.

(ETS, VxWorks) Complete the following steps to install WebDAV and SSL support on ETS and VxWorks targets:

  1. Open MAX.
  2. Expand Remote Systems in the configuration tree and then expand your RT target.
  3. Right-click the Software category and select Add/Remove Software to launch the LabVIEW Real-Time Software Wizard.
  4. Use the wizard to install the following components on your target:
    • SSL Support for LabVIEW RT
    • WebDAV Server

Configuring WebDAV


Use the following links to view configuration instructions specfic to your OS:
Configuring WebDAV on Windows Machines
Configuring WebDAV on OS X Machines
Configuring WebDAV on Linux Machines

Configuring WebDAV on Windows Machines


To use WebDAV on a Windows machine, you must map a target as a network drive or add the target as a network place. Use the following links to view configuration intructions specific to your Windows OS:
Windows 10
Windows 8 and 8.1
Windows 7
Windows XP

Windows 10


Complete the following steps to map a target as a network drive and configure the Microsoft WebDAV client on Windows 10:
  1. Select Start»File Explorer and then select This PC on the left pane.
  2. Select Computer from the top toolbar, then select Map Network Drive to open the dialog box.



  3. In the Drive pull-down menu, select a drive letter to assign to your target.
  4. In the Folder text box, enter http://hostname/files/ or https://hostname/files/, as shown in the preceding image, where hostname is the hostname or IP address of your target. For improved security, use https://hostname/files/ to specify an HTTPS connection enabled by SSL.

  5. Tip: You can use MAX to identify the hostname and IP address assigned to your target.

  6. Enable Connect using different credentials to use NI-Auth credentials instead of Windows credentials.
  7. (Optional) Disable Reconnect at logon if you do not want Windows to search for this network drive each time the current user logs on to Windows.
  8. Click Finish.

  9. Note: If you have connected to the target using the Web-Based Monitoring and Configuration tool, you will be unable to map the target drive. Please close the Web-Based Monitoring and Configuration window before attempting to map the Real-Time target's drive.

  10. When prompted, enter your user name and password and click OK. The default user name for your Real-Time target is admin and the default password is a blank password.

  11. Note: National Instruments recommends setting a password for improved security.

  12. You can now explore and transfer files on your target in as shown.



Tip: If you want to navigate to your target by manually entering the target path in a browser or Explorer address bar, do not use the notation \\hostname\DavWWWRoot shown when you connect to your target. Use the notation \\hostname\files instead, where hostname is the hostname or IP address of your target, as shown in the following image:


Windows 8 and 8.1


Complete the following steps to map a target as a network drive and configure the Microsoft WebDAV client on Windows 8 and 8.1:
  1. Select Start»Apps»Windows System»This PC
  2. Select Computer from the top toolbar, then select Map Network Drive to open the dialog box.



  3. In the Drive pull-down menu, select a drive letter to assign to your target.
  4. In the Folder text box, enter http://hostname/files/ or https://hostname/files/, as shown in the preceding image, where hostname is the hostname or IP address of your target. For improved security, use https://hostname/files/ to specify an HTTPS connection enabled by SSL.

  5. Tip: You can use MAX to identify the hostname and IP address assigned to your target.

  6. Enable Connect using different credentials to use NI-Auth credentials instead of Windows credentials.
  7. (Optional) Disable Reconnect at logon if you do not want Windows to search for this network drive each time the current user logs on to Windows.
  8. Click Finish.

  9. Note: If you have connected to the target using the Web-Based Monitoring and Configuration tool, you will be unable to map the target drive. Please close the Web-Based Monitoring and Configuration window before attempting to map the Real-Time target's drive.

  10. When prompted, enter your user name and password and click OK. The default user name for your Real-Time target is admin and the default password is a blank password.

  11. Note: National Instruments recommends setting a password for improved security.

  12. You can now explore and transfer files on your target in as shown.




Tip: If you want to navigate to your target by manually entering the target path in a browser or Explorer address bar, do not use the notation \\hostname\DavWWWRoot shown when you connect to your target. Use the notation \\hostname\files instead, where hostname is the hostname or IP address of your target, as shown in the following image:


Windows 7


Complete the following steps to map a target as a network drive and configure the Microsoft WebDAV client on Windows 7:
  1. Select Start»Computer.
  2. Select Map network drive to open the Map Network Drive dialog box.

  3. map network drive


  4. In the Drive pull-down menu, select a drive letter to assign to your target.
  5. In the Folder text box, enter http://hostname/files/ or https://hostname/files/, as shown in the preceding image, where hostname is the hostname or IP address of your target. For improved security, use https://hostname/files/ to specify an HTTPS connection enabled by SSL.

  6. Tip: You can use MAX to identify the hostname and IP address assigned to your target.

  7. Enable Connect using different credentials to use NI-Auth credentials instead of Windows credentials.
  8. (Optional) Disable Reconnect at logon if you do not want Windows to search for this network drive each time the current user logs on to Windows.
  9. Click Finish.

  10. Note: If you have connected to the target using the Web-Based Monitoring and Configuration tool, you will be unable to map the target drive. Please close the Web-Based Monitoring and Configuration window before attempting to map the Real-Time target's drive.

  11. When prompted, enter your user name and password and click OK. The default user name for your Real-Time target is admin and the default password is a blank password.

  12. Note: National Instruments recommends setting a password for improved security.

  13. You can now explore and transfer files on your target as shown.

  14. successful login to remote target


Tip: If you want to navigate to your target by manually entering the target path in a browser or Explorer address bar, do not use the notation \\hostname\DavWWWRoot shown when you connect to your target. Use the notation \\hostname\files instead, where hostname is the hostname or IP address of your target, as shown in the following image:

correct network path


(Optional) Disabling Automatic Configuration in Internet Explorer to Improve WebDAV Performance


After configuring the Microsoft WebDAV client on Windows 7, you may notice slow WebDAV performance. To fix this issue, complete the following steps to disable automatic configuration:
  1. Open Internet Explorer.
  2. Select Tools»Internet options.
  3. Select LAN settings from the Connections tab to open the Local Area Network (LAN) Settings dialog box.

  4. disabling auto proxy detection


  5. Disable Automatically detect settings.
  6. Click OK to apply the changes and exit the dialog box.

Note: After disabling automatic configuration, WebDAV performance improves immediately. However, with automatic configuration disabled, you may receive error messages related to file transfer failures. If you encounter this type of message, select Try Again to re-attempt the file transfer. Alternatively, you can leave automatic configuration enabled.

Windows XP


Complete the following steps to add a target as a network place and configure the Microsoft WebDAV client on Windows XP:
Note: For WebDAV to function properly on Windows XP, you must have Service Pack 3 installed.
  1. Select Start»My Network Places.
  2. Select Add a network place from the Network Tasks pane.
  3. In the Add Network Place Wizard, click Next.
  4. Select Choose another network location and click Next.
  5. The wizard prompts you for the address of the network place, as shown in the following image:

  6. add network place wizard windows xp


  7. In the Internet or network address text box, enter http://hostname/files/ or https://hostname/files/, as shown in the preceding image, where hostname is the hostname or IP address of your target. For improved security, use https://hostname/files/ to specify an HTTPS connection enabled by SSL.

  8. Tip: You can use MAX to identify the hostname and IP address assigned to your target.

  9. Click Next.
  10. Click Yes if a Security Alert dialog box appears.
  11. When prompted, enter your user name and password and click OK. The default user name for your Real-Time target is admin and the default password is a blank password.

  12. Note: National Instruments recommends setting a password for improved security.

  13. When prompted, enter a name for your target and click Next.
  14. Review your choices and click Finish to exit the wizard.
  15. You can now explore and transfer files on your target as needed.

  16. Note: You may have to enter your login credentials a second time to access your target.

    successful login windows xp


Configuring WebDAV on OS X Machines


Refer to the following steps to connect to the WebDAV server on OS X machines:
  1. Select Go»Connect to Server from the Finder menu to open the Connect to Server dialog box.

  2. os x connect to server


  3. In the Server Address text box, enter http://hostname/files/ or https://hostname/files/, as shown in the preceding image, where hostname is the hostname or IP address of your target. For improved security, use https://hostname/files/ to specify an HTTPS connection enabled by SSL.

  4. Tip: You can use MAX to identify the hostname and IP address assigned to your target.

  5. Click Connect.
  6. When prompted, enter your user name and password in the Name and Password fields. The default user name for your Real-Time target is admin and the default password is a blank password.

  7. Note: National Instruments recommends setting a password for improved security.

  8. Enable Registered User.
  9. Click Connect.
  10. You can now explore and transfer files on your target as needed.

  11. os x successful login


Configuring WebDAV on Linux Machines


Due to the large number of Linux distributions, National Instruments cannot provide a general set of instructions for configuring WebDAV on Linux machines. However, you can find instructions specific to your distribution on the internet.

Using Third-Party WebDAV Clients


Depending on your use case, you may find that third-party WebDAV clients offer better functionality and additional features when compared to the native client on your operating system. You can find third-party WebDAV clients on the internet.

Note: National Instruments does not test third-party WebDAV clients, and cannot guarantee the intended user experience when using these clients to connect to your target.

Transferring Files Using WebDAV


Once you have connected to your target using WebDAV, you can transfer files between your target and development computer. Refer to the following information to learn about access permissions and the file and directory structure of your target:

Read Access


Your target provides read access to all its folders and files, so you can view files and copy them to your development computer.

Write Access


(ETS, VxWorks) Your target provides write access to all its folders and files.
(NI Linux Real-Time) If you want to edit or create new folders and files on your target, you can do so only in the following directories:
  • /home/webserv
  • /home/lvuser
  • /tmp

Note: Your target deletes the content in the temporary folder /tmp on target restart.

Drag and Drop


You can drag and drop files with appropriate read and write access permissions between your development computer and your target.

File and Directory Structure


To learn about the file and directory structure of your target, visit ni.com/info and enter the Info Code RT_Paths.

Maximum File Size Limitation


The default maximum file size that you can transfer to Windows 7 is 50MB. If you try to transfer a file larger than this, you may see: Error 0x800700DF: The file size exceeds the limit allowed and cannot be saved.
You can transfer files larger than this by editing the registry key in Windows.

Using the WebDAV VIs


LabVIEW 2013 and later include the WebDAV VIs to help you transfer files securely to and from a WebDAV server. You can use the WebDAV VIs to access advanced functionality such as the following:
  • Programmatically store, edit, and manage documents and files on your target.
  • Obtain directory and path information.
  • View the progress of an upload or download request.
  • Start file transfer requests in parallel.
  • Process file transfer requests in response to a user interface event.
For information on using these VIs, refer to the WebDAV VIs topic in the LabVIEW Help, available by selecting Help»LabVIEW Help from LabVIEW or in our online help.

Using WebDAV over USB


It is possible to transfer files using WebDAV to and from a USB drive on the Real-Time Target; however, the settings will be dependent on what Real-Time OS your controller is running.
  • ETS: Create a new mapped network drive to http://hostname/drives/u
  • VxWorks: Create a new mapped network drive to http://hostname/files/u
  • NI Linux Real-Time: There will be a folder named U in your mapped network drive that will give you access to the USB drive on your Real-Time Target.
Note:If you are still unable to access the USB drive verify that a USB drive is connected and compatible with your Real-Time Target.

Related Links:
White Paper: Under the Hood of NI Linux Real-Time
LabVIEW Help: WebDAV VIs
KnowledgeBase 6AGDT2PK: How Do I Use FTP with My Real-Time Linux Target?
White Paper: Working with File Paths on Real-Time Targets
External Link: Download Windows XP Service Pack 3
KnowledgeBase 6BFE645Y: How Do I Disable the System WebServer on My Linux-RT Based Target?
External Link: Upload of large files (> 100 MB) via WebDAV on Windows 7 is failing when upload takes longer than 30 Minutes

Attachments:





Report Date: 05/15/2013
Last Updated: 10/13/2017
Document ID: 69EEMIR4

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit