Cook Computing

Outlook Web Access and WebDAV

December 19, 2002 Written by Charles Cook

I was experimenting with Outlook Web Access (OWA) and ProxyTrace yesterday after I read that OWA uses the WebDAV protocol. The first thought that came to mind was that there must be some pretty impressive JavaScript to make this possible and, sure enough, I found eight .js files in the IE cache with a total size of 181KB.

ProxyTrace reveals heavy use of the SEARCH WebDAV method. This is still at the draft stage and is used here to specify a range and ordering for the multistatus response from the server. A standard PROPFIND request would not work very well for displaying items in the Inbox. For example if the Inbox contains 5000 items and you only want to display the first 50 in most recent first order.

The request body for retrieving list of folders and associated properties is as follows (yes, it is invalid XML):

<searchrequest xmlns="DAV:">
 <sql> Select 
 WHERE "DAV:ishidden" = false

The contents of the inbox are retrieved with a slightly more complex request. Note the use of the range element to restrict the number of entries in the DAV multistatus response:

<searchrequest xmlns="DAV:">
  "" as prop1,
  "" as prop2,
  "" as prop3,
  "urn:schemas:httpmail:hasattachment" as prop4,
  "" as prop5, 
  "" as prop6,
  "urn:schemas:httpmail:datereceived" as prop7,
  "" as prop8,
  "urn:schemas:httpmail:read" as read,
  "" as messageclass,
  "DAV:href" as davhref
  WHERE "" = false 
   AND "DAV:isfolder" = false
  "" ASC,
  "urn:schemas:httpmail:datereceived"  DESC 
 <range type="row">0-24</range>

I was interested in determining whether performance using WebDAV is better than MAPI so I implemented a test with my .NET WebDAV library. WebDAV calls turned out to be significantly slower but this was maybe because the connection was being closed after each call and the NTLM authentication process was being repeated each time. I need to look into this further.

This article provides some information on OWA and WebDAV.