Use WebDAV for file sharing and transmission

Source: Internet
Author: User
Tags ftp client
Generally, file sharing is implemented through the file protocol, that is, common file sharing, and FTP or HTTP protocol on the Internet. However, the use of HTTP is generally only one-way sharing, which is not convenient for file upload. Traditionally, FTP is used. However, Windows Server can also use WebDAV (web-based Distributed Authoring and Versioning, Web-based distributed creation and Version Control) for file sharing.

 WebDAV is a communication protocol based on HTTP 1.1. It adds some extensions to HTTP 1.1 (that is, some new methods are added in addition to several HTTP standard methods such as get, post, and head), so that the applicationProgramYou can directly write the file to the Web server, lock the file when writing the file, unlock the file after writing the file, and support version control on the file. It is said that it is expected to replace FTP and become the standard method for moving files on the Internet. In this case, we can certainly make good use of it.

1. Enable the WebDAV function of the website
 To ensure security, IIS does not enable the WebDAV function by default. Therefore, you must enable the WebDAV function independently. by starting the "IIS manager" (inetmgr), expand the local computer, select "Web Service extension", right-click "WebDAV" on the right, and select "Allowed" to start the WebDAV function.

2. Create a web shared/virtual directory
 There are two ways to create a virtual directory directly in IIS, and right-click the folder to create a virtual directory through Web Sharing. In essence, virtual folders are created in metabase of IIS.

(Virtual directory created in IIS)

(Create a virtual directory through Web Sharing)3. Enable the WebClient Service

 To access the virtual directory, the client also needs to start the WebClient Service (except for HTTP access ).

4. Access the shared directory
 There are three methods:

    • HTTP

 Since it is an IIS virtual directory, you can certainly access it through common web pages. This method does not require the client to enable the WebClient Service.

    • Web Folder Mode

 On the IE browser menu, choose File> open ]:

    • MAP network drive

 You can use the following command or graphical methods:

C: \ Documents ents and Settings \ Administrator> net use * http: // 10.10.10.197/WebDAV
Drive Z: Now connect to http: // 10.0.10.197/WebDAV.

The command is successfully completed.


(After the network drive is mapped)

 In this way, we can copy and paste files like normal folders.

Appendix 1 2102 error:
 It is strange that the following errors may occur on some computers. But I don't know the reason or how to solve it.

C: \> net use * http: // 10.0.10.197/WebDAV
No workstation driver is installed.

Type net helpmsg 2102 for more help.

C: \> net helpmsg 2102

No workstation driver is installed.

Explanation

Windows NT is not installed, or the configuration file is incorrect.

Operation

Install Windows NT or ask the network administrator to check whether the configuration file is correct.

Appendix 2 Comparison Between WebDAV and FTP:

    1. You need to apply for an operating system account for FTP. WebDAV does not need to apply for any operating system account. It uses a set of secure and complete authentication mechanisms.
    2. All FTP data (including logon information) is transmitted in plain text. Encryption must be implemented by yourself. For example, you can use GPG to do this manually, but it is inconvenient after all. WebDAV can be used to transmit data over HTTPS. encryption and decryption are completed automatically at the lower layer.
    3. FTP data transmission efficiency is relatively low. A new TCP connection is required for each file to be transmitted, while WebDAV only needs one TCP connection for all files to be transmitted.
    4. FTP is not as easy as HTTP to traverse the firewall, and its application scope in the Wan is much smaller than that in HTTP. Because WebDAV is based on HTTP, it has all the advantages of HTTP.
    5. The FTP client tool does not have the webDAV client tool for ease of use. You have seen that after the WebDAV server is configured, accessing the web folder in Windows 2000/XP Web Folder mode is not much different from accessing the local folder. If the application supports the WebDAV protocol (for example, Word 2000), you can directly open and edit files in the web folder and save them in the original web folder.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.