Home > Articles > Data

  • Print
  • + Share This

File URLs

In case you haven't heard already (tongue planted firmly in cheek), every item in Exchange 2000 is accessible via a URL. All programming tasks in Exchange are also URL based. When dealing with the Exchange OLE DB provider, you can use either "file://" or "http://" URLs. Let's look at the ground rules for each.

Your file URL can take two forms, depending on what you want to access. Use this one when you want to access a private mailbox:


Use this one when you want to access a public folder tree:


In both forms:

  • domain-name refers to the fully qualified domain in which the store resides (e.g., "mydomain.local" or "somedomain.plural.com").

  • public-folder-tree-name refers to the public folder tree in which the item resides. Several values can be used here. "Public Folders" is the default folder tree name for the backward-compatible MAPI public folder hierarchy that you see under All Public Folders in Outlook. Elsewhere in the book we talk about top-level hierarchies (TLHs), which are new public folder trees that you can create. If you create a TLH, you can use its name here. You can also use the string "MBX" to refer to the private mailbox store.

  • user-alias refers to a user's Exchange mailbox alias (i.e., "gomeza" in our example).

  • path is the folder path to the item, consisting of folder names separated by "/", just like any other folder path.

Some examples will help illustrate. For example, Table 7.2 shows how to access the standard default mailbox folders using file URLs.

Table 7.2  Default Mailbox Folder File URLs

Folder URL
Calendar file://./backofficestorage/<domain-name>/MBX/<user-alias>/Calendar
Contacts file://./backofficestorage/<domain-name>/MBX/<user-alias>/Contacts
Drafts file://./backofficestorage/<domain-name>/MBX/<user-alias>/Drafts
Inbox file://./backofficestorage/<domain-name>/MBX/<user-alias>/Inbox
Journal file://./backofficestorage/<domain-name>/MBX/<user-alias>/Journal
Notes file://./backofficestorage/<domain-name>/MBX/<user-alias>/Notes
Outbox file://./backofficestorage/<domain-name>/MBX/<user-alias>/Outbox
Sent Items file://./backofficestorage/<domain-name>/MBX/<user-alias>/Sent%20Items
Tasks file://./backofficestorage/<domain-name>/MBX/<user-alias>/Tasks

Similarly, if we wanted to access a brand-new TLH called The Web Storage System that we had created on our local Exchange 2000 server, we could use the following URL:


If we created a new public folder called Exchange Book Talk under the default Exchange public store, we could use the URL


Note: When using the "file://" URL namespace to refer to Exchange items, you do not need to explicitly specify the Exchange OLE DB provider. To avoid confusion, however, you should always explicitly open a connection and set the provider as shown earlier in the chapter.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.