LOCK Sample Code

As mentioned earlier, the WebDAV LOCK method provides a mechanism for avoiding lost updates. Right now, only basic exclusive lock is supported, which means that updates to resources will be serialized. When a person issues a lock on a resource, he will be able to access and update the locked resource. With the LOCK method specified in the request header, we need to provide more information about the lock in the body of the request in XML form. Sample code provided in Listing 16.10 shows complete VBScript code for issuing a lock, and Listing 16.11 shows the response returned from the server.

Listing 16.10. The Sample Code for LOCK Method of WebDAV Protocol
 Dim strServer Dim strWorkspace Dim strFolder Dim strURL Dim strUser Dim ...

Get Special Edition Using Microsoft® SharePoint Portal Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.