Welcome to MSDN Blogs Sign in | Join | Help

FYI: MSDN Doco Correction: System.Net.Mail AlternateView doc error...

Ryan Rinaldi does a good job of pointing out an error in our MSDN documentation on the AlternateView class, part of System.Net.Mail.  Our product documentation for the AlternateViews property in MSDN and in the SDK includes a sample for adding an HTML body to a MailMessage.  The error is in the use of the AlternateView constructor…

AlternateView alternate = new AlternateView(body, MediaTypeNames.Text.Html);

 

While this use of the constructor does fit one of its signatures and the code will compile it is not correct in that the constructor is looking for a file path in the first string not the body text.  In order to create an HTML AlternateView from an HTML string such as the body created in this example, use the static CreateAlternateViewFromString method as seen below…

AlternateView alternate = AlternateView.CreateAlternateViewFromString(body, MediaTypeNames.Text.HTML);

 

…I wish it was as simple as firing up notepad and correcting the documentation but it isn’t.  We will get this content corrected.  I definitely appreciate Ryan and my customer for pointing out this error…

…NOTE: An important note about how Support Services works here at Microsoft as it relates to this issue.  A customer brought this documentation error to my attention through a support case at Microsoft.  Please note that in the case of reporting a bug with our products or documentation, you will be refunded any payment made to Microsoft for a support incident.  If you are still hesitant to open a case for whatever reason please contact me using the email link or contact our newsgroups.  We do listen and we do want to improve our products and their documentation…

posted by mstehle | 0 Comments
Filed Under: ,

FYI: MAPI Editor Is Here! (Formerly known as MFCMAPI)

My good friend Steve Griffin has been hard at work updating MFCMAPI to now be worthy of a bland PR branding that strips it of all personality in MAPI Editor.  Also he has MAPI Editor added to the Exchange source tree as an official product utility.  Read more on his blog...

 

Announcing MAPI Editor (Formerly MFCMAPI)

http://blogs.msdn.com/stephen_griffin/archive/2006/06/07/621138.aspx

 

…Note that the source for MAPI Editor is not currently available.  Steve is aware of this request and frankly it is quite helpful to make the source available as sample code from a support standpoint.  Steve addresses this request in a later blog post, here…

 

http://blogs.msdn.com/stephen_griffin/archive/2006/06/08/622236.aspx

FYI: New Look Into the Future of Outlook Development (Outlook 2007 Preview Docs Released)

The Office 2007 Product teams have begun posting public information on the new Office suite including the Outlook 2007 team giving an overview of what is new for developers in Outlook 2007…

 

“…Outlook 2007 object model includes more than 85 new objects and the size of the object model has more than doubled…”

 

What is New for Developers in Outlook 2007? (Part 1)

http://msdn2.microsoft.com/en-us/ms772422(office.12).aspx

 

What is New for Developers in Outlook 2007? (Part 2)

http://msdn2.microsoft.com/en-us/ms772423(office.12).aspx

 

…Many of the changes, additions, and new features of Outlook 2007 development are quite significant and eagerly awaited by the development community.  Most significant IMHO are the changes to security and the form region technology…

 

The new articles below give examples of Outlook 2007 Add-ins as well as discuss the security changes to Outlook 2007 which will greatly enhance the development experience as well as the user experience.

 

Outlook 2007 Sample Add-ins…

http://msdn2.microsoft.com/en-us/ms778811(office.12).aspx

 

Code Security Changes in Outlook 2007…

http://msdn2.microsoft.com/en-us/ms778202(office.12).aspx

 

Another important and less public announcement is the release of a free Visual Studio 2005 Add-on currently called Cypress which will allow you create Outlook 2007 Add-ins with VS 2005.

 

“...Cypress is an add-on and is incremental.  It is not, itself a complete Visual Studio product release.  Anyone who has a licensed version of Visual Studio 2005 will be eligible to download Cypress for free.”

 

Cypress Announcement…

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=459132&SiteID=1

 

…Keep in mind this is not a full feature set like Visual Studio Tools for Office.  The release of the full Visual Studio Tools for Office is slated with the next release of Visual Studio currently code named Orcas.  This is important as many were worried that VSTO 2005 would not be able to build Add-ins for Outlook 2007 (which it can’t without Cypress)…

 

The developer help files were updated for Office 2007 recently.  As the product is in beta, we are providing updates to the documentation as it becomes available.  Keep in mind that the documentation is in beta just like the product so feel free to voice your opinions on both.

 

Updated Developer Help files for Office 2007…

http://www.microsoft.com/downloads/details.aspx?familyid=066f9f31-9d7b-4d5e-8759-55fb4bf24d52&displaylang=en

FYI: The Freebusy Story & New Sample Code!

Many times when scheduling appointments in Exchange, especially when you are already using HTTP requests with DAV, you might want to check the availability of people or resources via the public Free/Busy information in Exchange.  I recently posted some C# code providing an example of how to do use the OWA command to get this data (yes, this is one of the few supported OWA commands)…

How To Get Free/Busy Information

http://blogs.msdn.com/mstehle/articles/628573.aspx

 

However, what you will notice is that when you post an appointment via WebDAV, OWA, CDOEX, or CDO 1.21 the Free/Busy information available from this OWA command is not up to date.  In fact it takes about 5 minutes for it to get updated.

To understand this behavior we need to get the full story on Free/Busy in Exchange and Outlook.  The following links layout the story…

Here is some of our product documentation on how OWA and Outlook publish free busy data.  Note the section related to how OWA updates the Free Busy Folder...

http://www.microsoft.com/technet/prodtechnol/exchange/guides/WorkingE2k3Store/36ea912b-6040-499d-948b-762bec84e8fc.mspx?mfr=true

 

OWA, WebDAV, and CDOEX fall under the same design, relying on MSExchangeFBPublish to publish the Free/Busy data on an interval for public retrieval through the OWA command.  This can be problematic if you have people scheduling resources on frequent intervals and what to get real time or at least very near real time availability information.

 

Here is information from the Exchange team blog on setting a regkey to control the polling interval for the MSExchangeFBPublish thread.  Notice that the most frequent updates you can set are every 30 seconds...

http://msexchangeteam.com/archive/2004/08/19/217187.aspx

 

Here is a more detailed look at the "Free Busy Story" from the Exchange team blog...

http://msexchangeteam.com/archive/2004/06/02/146939.aspx

 

If you want to accurately determine what appointments are scheduled at a particular point in time then you should not rely on the Free/Busy query instead you should query the resource calendar yourself to find conflicts.  Here is a sample I just posted for querying a calendar for conflicts via WebDAV in C#...

 

How To Search Calendar For Conflicts

http://blogs.msdn.com/mstehle/articles/628646.aspx

 

FYI: ProtocolSettings and MAPI client restrictions affect MAPI and CDO 1.21

There are several options for configuring restrictions on MAPI client access to Exchange 2003 SP 2.

…some were around prior to SP 2...

288894 How to disable MAPI client access to an Exchange Server 2003 computer or to an Exchange 2000 Server computer
http://support.microsoft.com/default.aspx?scid=kb;EN-US;288894

…some were new to SP 2...

Microsoft Exchange Server 2003 Service Pack 2 Release Notes

Enabling and disabling MAPI and/or non-Cached access per user in Exchange 2003 SP2

http://blogs.technet.com/exchange/archive/2005/07/27/408274.aspx

 

Typically these restrictions are used to lessen the attack surface for an organization whose users only use OWA, POP3, or IMAP to connect to Exchange.  By turning off MAPI all together, limiting the versions of MAPI clients, or specifying the required cached mode administrators gain great control over who is accessing Exchange.

 

When developing an application that uses MAPI either directly or through CDO 1.21 it is important to understand how these MAPI restrictions affect code.  These restrictions are applied on a mailbox basis in Active Directory.  There are no flags or permissions that can get you past these restrictions so that you can directly log on to a restricted mailbox.

 

The only way to access a restricted mailbox is to use MAPI functions like GetMailboxTable or CreateStoreEntryID to open another information store while logged on as a service account that does not have MAPI access restricted.  In this configuration, all user accounts have MAPI restrictions while this one service account does not.

 

CDO 1.21 does not have the ability to jump to a different information store like MAPI.  There are no calls like GetMailboxTable and CreateStoreEntryID in CDO and GetInfoStore will only retrieve an information store loaded in the current profile.  So even while logged into a Session as the service account, CDO offers no ability to get to another restricted user’s mailbox like MAPI.

 

…Consider this in a scenario when you are relying on CDO 1.21 for calendaring support and MAPI for mail message manipulation.  The bottom line is you can work around these restriction settings with MAPI code but there is no workaround for CDO 1.21.  There are no plans to update CDO 1.21…

 

posted by mstehle | 0 Comments
Filed Under: , ,

HOWTO: How To Search mv.string Properties using WebDAV

...I have posted a new WebDAV sample for using mv.string properties like Keywords and RRule in WHERE clauses, enjoy...

DAV: How To Search mv.string Properties

posted by mstehle | 0 Comments
Filed Under: ,

KB: Frequently asked questions about custom forms and Outlook solutions

Since joining the Messaging Developer Support team last year, my main focus has been on Exchange development, rather than custom forms and Outlook programming.  There are many "gotchas" in Outlook development that one must keep track of.  Only someone who works with Outlook Object Model day in and day out for years could know off the top of their head half of the considerations one must take when programming in Outlook.  The following KB article goes a long way to answer some of frequently asked questions and provide links to other important KB articles to look over when starting Outlook development...

287530 Frequently asked questions about custom forms and Outlook solutions
http://support.microsoft.com/default.aspx?scid=kb;EN-US;287530

OUTBOX: Registering a VB Script Store Sink

The following is an exerpt from an email describing the steps to setup a VBS event sink on Exchange...

Before registering the event sink you need to install and configure a COM+ component which will execute the VB Script.  This COM+ ships with Exchange and is used to execute any VB Script event sinks on the server.  You will need to download the Exchange Server SDK to get regevent.vbs and eshmts.vbs which are discussed below.
 
You only need to do the following steps one time on the server...
 
 
2. When you setup the Script Host in COM+ you will specify a domain account and password for the COM+ component to run as.  This account will need permissions to the mailboxes or folders that the sink will be registered to as well as local permissions to write to the log file.  You can give permissions to individual user accounts through Active Directory Users and Computers (ADUC).  In Exchange System Manager (ESM) you can give permissions organizational levels to provide broader access.  Also this scripts sends out email, for this script to be able to send mail as another account you need to grant that permission on the account in ADUC.
 
 
After setting up the Script Host, you will then register the script on each folder or mailbox that you want it to run.  I usually create a batch file to add and remove a script while testing.  You need to run your batch file as a user with write permissions to the mailbox or folder you are registering the script on.
 
Here is the command I used in my batch file...
cscript "C:\Program Files\Exchange SDK\SDK\Support\OLEDB\Scripts\RegEvent.vbs" Add OnSave ExOleDB.ScriptEventSink.1 "file://./backofficestorage/mstehle03.extest.microsoft.com/mbx/mrmet/inbox/scriptevent" -file "C:\files\code\EventSinks\ScriptSinks\OnSave.vbs"
This will create a registration item at the given file path.  Notice that my script is creating a registration item called "scriptevent" in mrmet's Inbox.  You will need to change the VBS file path and mailbox URL according to your environment.
 
...After following these steps there is no requirement for getting the VBS file on the file system as it is stored in the registration item itself.  If you do a GET on the registration item you will see your VBS code...
 
...Another note Exchange Explorer can setup these registrations through a wizard but for VBS sinks it doesn't add the script to the registration item, rather it creates a seperate IPM.Document that is the script file.  This is annoying because it isn't hidden and will appear in the folder when viewed in Outlook or OWA.  Obviously deleting this file will break the sink...
posted by mstehle | 0 Comments
Filed Under: ,

FYI: New Sample Code! CDOEX & WebDAV How To Add Recurrence to

In an effort to provide samples in a organized and repeatable manner, I have created a format for adding code samples to my blog.  The code samples will be added as articles which won't get aggregated here.  You can also check the TOC to get links to the new sample section as they come available (right now I just have CDOEX and WebDAV section).  I will make posts to advertise the new sample additions so that those of you who subscribe to this feed will get notifications but the code itself will be not be in the post.  For example...

After struggling to get this just right for items created in Outlook and OWA, I have samples available that add recurrence to a single appointment using CDOEX and WebDAV...

CDOEX: How To Add Recurrence to a Single Appointment

DAV: How To Add Recurrence to a Single Appointment

...Enjoy

HOWTO: Configure Exchange Event Service on Exchange 2003 with minimum permissions

We have received several support calls in the past months relating to migrating Exchange Event Service Scripts from Exchange 5.5 to Exchange 2003.  Because it isn’t straightforward or documented (to my knowledge), I came up with this information to help you get your scripts working in Ex 2000.  This should only be migration step and I don’t encourage new development to utilize this technology.  This will NOT be around in Exchange 12.  Please note my previous post before moving forward…

 

KB: Suitable Applications for Exchange Server Event Scripting

http://blogs.msdn.com/mstehle/archive/2005/12/27/507610.aspx

 

That being said this is how to setup Exchange Event Service Scripting on an Exchange 2003 server with the minimum permissions needed for both the script authors (the users who will write scripts) and service account (the account used to run the Exchange Event Service).  I have tried to provide details of the permissions at the lowest level possible.  Obviously if you have numerous mailboxes and application folders you can choose to apply permissions at higher levels (store, group, or organization)…

 

Service Account Setup

The following steps detail how to create a service account which executes event service scripts...

 

  1. In Active Directory Users and Computers (U&C): create a new account, specify a password, mark it to never expire and user cannot change, create a mailbox
  2. In U&C: add this account to the local “Administrators” group.  Do not add it to the “Domain Administrators” group, this will enact specific denials on the mailbox store and elevate the permissions unnecessarily within the domain.
  3. In Exchange System Manager (ESM): right click on the organization group, select “Delegate Control…” and add the service account as an “Exchange View Only Administrator”.  For more information see the following article…

23018 Overview of Exchange administrative role permissions in Exchange 2003

http://support.microsoft.com/default.aspx?scid=kb;EN-US;823018

  1. In U&C: Give the service “Full Mailbox Access” to any script author accounts by right clicking the author’s account, selecting properties, selecting the “Exchange Advanced” tab, and clicking the “Mailbox Rights” button.  You may have many authors or want to enable everyone to author scripts potentially.  Instead of applying permissions on a mailbox basis, in ESM you can give “Receive As” permissions to a mailbox store, administrative group, or organization.
  2. In ESM: Give “Owner” permissions to any public folders that will have events setup on them.  If events will be setup on mailboxes, the service account must of “Full Mailbox Access” on the mailboxes.
  3. In ESM: Select the “Public Folders” node under the “Folders” node of the Administrative Group, right click and select “View System Folders”.  Expand the “Events Root” folder and give “Owner” permissions to the service account on the "EventConfig_<exchange server name>" folder.This folder may not exist if you haven’t tried to start the Exchange Event Service before.  Just start the service to create the folder.
  4. At this point you either have to wait for these permissions to replicate which could take up to 2 hours or you can restart the Exchange Information Store service.
  5. In the Services management console, change the Exchange Event Service to “Logon As” the service account and specify the “Startup Type” as “Automatic”.  Then start the Exchange Event Service.

 

Script Author Setup

The following steps detail how to setup an existing Exchange user to author scripts…

 

  1. In ESM: Give “Owner” permissions to any public folders that will have events setup on them.  If events will be setup on mailboxes, the service account must of “Full Mailbox Access” on the mailboxes.
  2. In ESM: Select the “Public Folders” node under the “Folders” node of the Administrative Group, right click and select “View System Folders”.  Expand the “Events Root” folder and give “Owner” permissions to the service account on the "EventConfig_<exchange server name>" folder.
  3. Ensure that the service account has “Full Mailbox Access” to the script author’s mailbox or “Receive As” permission on the store, group, or organization that the script author’s mailbox resides in.
  4. In order to create and edit scripts the author will need to use Outlook through the “Agents” tab.  To enable this tab in Outlook turn on the “Server Scripting” add-in.  In Outlook, click Tools, select Options, click the Other tab, click the “Advanced Options…” button, click the “Add-in Manager…” button, and check the “Server Scripting” add-in.
  5. Restart Outlook and right click on the folder to create events in and select Properties.  Click on the Agents tab to create Exchange Event Service Scripts.

Here are some resources I used when putting together this information.  Because permissions in Exchange 2003 are much tighter than Exchange 5.5, I needed to identify and infer what permissions were required by the Exchange Event Service based on the old Exchange 5.5 doco below and use the newer Exchange 2003 security information to figure how to apply minimum permissions...

 

MSDN - Scripts, Agents, and Security

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/exchserv/html/events_2cxl.asp

 

EHLO - Minimum permissions necessary to access mailbox data

http://blogs.technet.com/exchange/archive/2006/01/25/418099.aspx

 

Here are some additional resources for Exchange Event Service Scripts.  Because the only documentation we have on MSDN is related to Exchange 5.5, it can be a little hard to find…

 

MSDN - Exchange Event Service, Event processing steps

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/exchserv/html/events_2bfr.asp

 

MSDN - Agents tab in Outlook

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/exchserv/html/events_8jvp.asp

 

MSDN - Using the Script Debugger with Exchange Event Service Scripts

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/exchserv/html/events_1eeq.asp

 

...Many thanks to Chris Nguyen for helping me with some of research

HOWTO: Bind to items from CDO/MAPI using WebDAV

Summary

 

Using PR_URL_COMPNAME to bind to an item in WebDAV from CDO/MAPI involves understanding the encoding rules for the Exchange version where the item is homed. These rules are different and incompatiable between Exchange 2000, Exchange 2000 SP 1, and Exchange 2003. These rules are not documented and often require reverse engineering to properly encode URLs.

Reading proptag 0x670E001E via MAPI on a folder or item will return a value such as…

 

/-FlatUrlSpace-/ca09cf9efaad754e8a85909b04bb255c-12ee443

 

...which can be appended to a URL and used to access and item or folder via WebDAV…

 

http://server/exchange/mailbox/-FlatUrlSpace-/ca09cf9efaad754e8a85909b04bb255c-12ee443

More Information

Flat URLs do not have encoding and escaping rules and will work for folders and items in most every DAV operation with the following exceptions:

- as destination of MOVE or COPY operation
- as a source for a DELETE
- for OWA URL commands, e.g. "?cmd=[foo]"

 

...You are going to use this property in cases where you are stepping out of CDO 1.21 or MAPI code into WebDAV.  The HREF in WebDAV is usually created from the subject that was typed in OL (messages created in OWA typically have a GUID file name).  The subject in OL can contain characters that must be encoding for use with DAV similar to URL encoding.  Rather than figure out those rules, you can use the Flat URL to get the item.  The great thing about the proptag is that it is a direct link between MAPI and WebDAV...

 

...Enjoy...

FYI: CDO 1.21 Anonymous logon changes in Exchange 2000/2003

...Don't know if many people try to use this anymore but it is worth noting...

 

SYMPTOM

Receive MAPI_E_FAILONEPROVIDER when attempting to log on anonymously to Exchange 200x using CDO 1.21.

 

...OR...

 

After anonymous log on to Exchange 200x using CDO 1.21, session object's AddressLists collection is empty.

 

CAUSE

In Exchange 200x there are several changes that affect using the anonymous log on method to gain access to Exchange:

  • The client (Outlook) version of CDO 1.21 cannot no longer log on anonymously to Exchange 200x
  • The server (Exchange) version of CDO 1.21 can log on anonymously but has no access to the Global Address List (GAL) or information stores by default
  • The distinguished name should be formatted in the following manner to log on anonymously to Exchange 200x

"/cn=com/cn=domainname/cn=servername"

 

RESOLUTION

Change your code to use a temporary (dynamic) profile as illustrated in the following article.

 

195662 How to log on to Exchange with the ProfileInfo parameter

http://support.microsoft.com/default.aspx?scid=kb;EN-US;195662

 

ADDITIONAL INFO

When using temporary profiles in an ASP application the account which the ASP code is running in must have access to the Exchange account used in the profile.

 

Refer to the following article for information on using temporary profiles in an ASP application.

 

254567 PRB: CDO:"MAPI_E_NOT_FOUND" Error When You Call Session.Logon

http://support.microsoft.com/default.aspx?scid=kb;EN-US;254567

 

posted by mstehle | 0 Comments
Filed Under: ,

FYI: The Future of Public Folders

The Exchange Team has a great new post on the future of Public Folders in Exchange 12 and understanding how they are implemented.  Be sure to read this post if you are thinking about moving to Exchange 12 and/or Outlook 2007, this article will provide you the facts for your public folder migration plans (or delay making plans all together).

...There are many custom applications that use Public Folders and while most will be supported there certain types of custom applications that require more than just the folder to work.  For example, custom applications that use Exchange Workflow will have to be migrated for E12 because Workflow is not supported on E12...

...Also of note when planning your migration away from older Outlook clients is that they require public folders to work and that as long as you have pre Outlook 2007 clients connected to Exchange 12, you will need to have public folders enabled...

...The main focus of this article is to put your migration fears on hold, if not to rest, for Exchange 12 in that you will still have the Public Folder technology.  Given that, the alternative technologies such as InfoPath, Sharepoint, and Windows Workflow Foundation are definitely worth looking into as they are exciting products and will be continue emphasized as a migration path for aging Exchange technologies...

posted by mstehle | 1 Comments
Filed Under: ,

FYI: Exchange Team Blog: Minimum permissions necessary to access mailbox data

For those of use who have fought with Exchange account permissions, here is a concise description of the minimum requirements for service account setup to access mailboxes...
 
To learn more about the "Exchange View Only Administrator" role, check out this KB article...
 
A number of our issues involving Exchange Event Service Scripts specifically deal with proper service account setup rather than coding changes.  Proper service account setup that provides MINIMUM access needed for your application to function is a part of most every solution written for Exchange.  This is good stuff to know...

OUTBOX: Introduction to Exchange Store Event Sinks Part 2

Coming from Exchange 5.5 Event Service Scripts to Exchange Store Event Sinks involves more than just understanding the new events available and the registration process.  Exchange 5.5 event scripts are written in VBScript with CDO 1.21 as the API to interact with Exchange data.  Store Event Sinks can be written in VBScript, VB6, managed (.NET) code, and C++ they use ExOLEDB with ADO and CDOEX to interact with Exchange data.  This is greatly improves scalability and performance but requires a bit of retooling for the developer to be comfortable in their new surrounds.  The following information discusses what you need to know about the web store how to interact with data using CDOEX and ExOLEDB.
 
Exchange Store
 
One important distinction to make between Exchange 5.5 and Exchange 200x is the storage architecture.  This is an important consideration when looking at the new API's available in Exchange 2000 and 2003 because many of the new API's relate to what is called Web Store or stream database that is added to the Exchange storage system.  Exchange store event sinks, WebDAV, CDOEX, and ExOLEDB with ADO all work against the web store primarily as opposed to CDO 1.21 and MAPI which work against the ESE database (which was part of Exchange 5.5 as well and is commonly referred to as the MAPI database).  We will talk about ExOLEDB and CDOEX mainly because that is what you will use in an Exchange Store Event Sink.
 
Exchange Storage Architecture
 
 
CDOEX, ADO, Properties, and Exchange SQL
 
The web store uses native intermittent content such as MIME which allows access through ExOLEDB with ADO and WebDAV and the use of SQL-like queries to find information.  This is quite helpful and a little more intuitive for the database programmer.  Each item (folders and messages) in the store can be created, modified, and searched like a row in a database were item properties are columns. 
 
Folders can be used like tables and rows, for example to query the subfolders of a given root folder you would select the URL from all items in the root folder where the item "isFolder" column is "true"...
Select "DAV:href" from scope('shallow traversal of <ROOT FOLDER URL>) Where "DAV:isfolder" = True
The following link provides a description of the SQL predicates supported against the web store.
 
Exchange Store SQL
 
Add just like in a database when you write a query like the one of above you need to know two key pieces of data specific to your store, the table name and the available columns.  The table name is pretty easy to identify as it is the folder you what to query from.  The column names differ for each item type with some overlap.  For example appointment items and contact items have most of the same properties of a basic message but they also have their own unique properties that relate to their functions.
 
The following link provides a listing of properties available on different items organized by namespace.  You will use the full namespace and property name when pulling fields from the Fields collection of a CDOEX object or querying in WebDAV or ADO.
 
Properties by Namespace
 
The interesting thing about this paradigm is that it is often quite easy for a database developer to walk in and start using ExOLEDB with ADO and WebDAV to execute these kind of queries against Exchange.  However, a developer coming from MAPI or CDO 1.21 is usually left looking for the objFolder.Folders collection.  ExOLEDB with ADO and WebDAV provide a way to retrieve raw information from the server, they are not an object model.  CDOEX provides some interfaces and CoClasses to provide a bit of an object model for interacting with the web store.
 
MSDN Reference for CDOEX CoClasses, Interfaces, etc.
 
In event sink development you will typically stay within the interfaces of the CDOEX object you open with the URL passed into the event interface.  Especially when working with meetings and contacts note that CDOEX provides a supported way for working with these item types.  ExOLEDB with ADO and much of WebDAV offers you raw access to the items in the web store, complex item types like appointments and contacts require CDOEX or special WebDAV commands to ensure that all the appropriate properties are being set to ensure that end user clients display and use the information appropriately.
 
It is important to understand the limitations of each API and where you should use which.  CDOEX and ExOLEDB with ADO should only be used on an Exchange server, specifically they can only be used the Exchange server which hosts the mailboxes or public folders you want to access.  WebDAV should be used to remotely access Exchange mailboxes and folders that may not reside on the server it is running on, it can also be executed on a non-Exchange server.  All of these technologies are supported with managed (.NET) code, CDO 1.21 and MAPI are NOT supported with managed code.
 
813349 Support policy for Microsoft Exchange APIs with the .NET Framework applications
http://support.microsoft.com/default.aspx?scid=kb;EN-US;813349
 
Examples
 
Exchange Tasks
This is a great starting place when you are looking to see what you can do with Exchange API's.  There are all kinds of great code samples here to allow you to do all kinds of stuff against the store.  I have pulled a couple samples out that relate to some common tasks developers do inside event sinks.
 
Adding an Appointment to the Calendar
 
Responding to a Meeting Request
 
Listing Inbox Contents Using ADO
More Posts Next page »