Once you have created a WebDAV publishing directory, you may want to allow users to search for content and file properties.
To set up your publishing directory for searchingIf you put the directory on a drive formatted for the file allocation table (FAT) file system, clients can search for resource content, but cannot search for resource properties.
net start cisvc
If Index this resource is not selected, Indexing Service will not create a catalog for that directory, and therefore, no one will be able to search it. If Read access has not been selected, a client can search the directory, but will not be able to see the results of the search. For details on setting IIS 5.0 permissions for a virtual directory, see Setting Web Server Permissions.
The Microsoft implementation of WebDAV allows you to create a tool for clients to search a directory for content or properties or both. The following example shows a basic search command from which you can create a tool:
SEARCH /webdav HTTP/1.1 Host: iis Content-Type: text/xml Content-Length: 157 <?xml version="1.0"?> <g:searchrequest xmlns:g="DAV:"> <g:sql> Select "DAV:displayname" FROM SCOPE() </g:sql> </g:searchrequest>
For details on creating a search tool, see the Microsoft® Platform SDK.
There are two kinds of properties: server defined and user defined.
Server-defined properties include all properties created and maintained by the server. These properties are Read-only, and therefore, cannot be modified. Examples include the date a document was created and when it was last modified.
User-defined properties include all properties that can be created and modified by a user. Examples include the author of a document and the document's title. If you want clients to be able to find documents based on a user-defined property, you must create the property or make sure that it already exists.
Along with existing properties that users can define and modify, you can create your own custom properties. This means you could create a custom property called Source which names any resource consulted in developing a document. A user could then search a site for all documents developed from a certain source. The following example shows a property which names resources at the Library of Congress.
where contains ("Source", "Library of Congress")
Note Currently, WebDAV only supports searching for custom properties that are strings.