Le Café Central de DeVa
let.us.develop.share.messaging.more... DeVa blogs!!
I changed the way of blogging. Re-designed the site & started using the latest Windows Live Writer 2011!! Additionally added Microsoft Translator gadget available @ top of page, so that you can change the page in your preferred language!!
Hi, I am Deva working with Microsoft Dev. Messaging & Collaboration team.
This blog will assist developers who design/develop custom applications using Microsoft Messaging libraries. I will try to touch base other developer related info too.
Let us talk.develop.messaging.share.more.
MAPI Architecture
MAPI is a messaging architecture that enables multiple applications to interact with multiple messaging systems seamlessly across a variety of hardware platforms.
MAPI Objects and General Architecture
All of the objects defined by MAPI fall into one or more layers in the MAPI architecture.
The following article shows where each of the MAPI objects fits into the MAPI architecture. The objects are represented with the names of their derived interfaces.
In general,
MAPI Subsystem
The MAPI subsystem is made up of the MAPI spooler, a common user interface, and the programming interfaces. The MAPI spooler is a separate process responsible for sending messages to and receiving messages from a messaging system. The common user interface is a set of dialog boxes that gives client applications a consistent look and users a consistent way to work.
The above article shows how Simple MAPI, CMC, and the CDO Library are layered between MAPI and client applications. Messaging-based clients call directly into MAPI while messaging-aware and messaging-enabled clients call into Simple MAPI, the CDO Library or CMC. Calls to these higher level APIs are forwarded to MAPI.
MAPI - Programming interfaces
MAPI has programming interfaces that are used by the MAPI subsystem, by client application writers, and by service provider writers. The main programming interface is an object-based interface known as the MAPI programming interface. Based on the OLE Component Object Model, the MAPI programming interface is used by the MAPI subsystem and by messaging-based client applications and service providers written in C or C++.
Client Application Writers
Client application writers have a choice of three other interfaces:
Note: Simple MAPI, CMC, and CDO Library client interfaces are primarily for messaging-aware and messaging-enabled client applications. These interfaces are less complex. Applications that require fewer messaging features can use Simple MAPI, CMC, or the CDO Library to implement these features quickly and easily.
Note:
MAPI client application
Client application categories
Client applications can be organized into one of the following three categories:
i) Messaging-aware applications A messaging-aware application does not require the services of a messaging system, but includes messaging options as an additional feature. Example: A word processing application that includes a Send command in its File menu to allow documents to be sent is considered messaging-aware. ii) Messaging-enabled applications A messaging-enabled application requires the services of a messaging system and typically runs on a network or an online service. Example: A messaging-enabled application is Microsoft Mail. iii) Messaging-based work group applications A more advanced client application is the messaging-based work group application. The work group application requires full access to a wide range of messaging system services, including storage, addressing, and transport services. These applications are designed to operate over a network without users having to manage the applications' network interaction. Example: Such applications include work flow automation programs and bulletin board services.
i) Messaging-aware applications
A messaging-aware application does not require the services of a messaging system, but includes messaging options as an additional feature.
Example: A word processing application that includes a Send command in its File menu to allow documents to be sent is considered messaging-aware.
ii) Messaging-enabled applications
A messaging-enabled application requires the services of a messaging system and typically runs on a network or an online service.
Example: A messaging-enabled application is Microsoft Mail.
iii) Messaging-based work group applications
A more advanced client application is the messaging-based work group application. The work group application requires full access to a wide range of messaging system services, including storage, addressing, and transport services. These applications are designed to operate over a network without users having to manage the applications' network interaction.
Example: Such applications include work flow automation programs and bulletin board services.
EXOLEDB Overview
EXOLEDB Architecture
The above article shows the relationship between ADO, CDO, OLE DB, the ExOLEDB provider, and the Exchange store.
Exchange Web Services
Exchange Web Services is deployed with the Client Access server role. Microsoft Exchange Server 2007 clients connect to the computer that is running Exchange 2007 that has the Client Access server role installed in an Active Directory directory service site by using an HTTPS connection.
For more information refer this article
Delegates & Exchange Web Services
In Microsoft Exchange Server 2007 SP1, you can use Exchange Web Services to add, update, and remove delegates.
Code sample
Please find the code example that shows you how to add delegates that can take actions on behalf of a principal. In this code it shows how to add two delegate users to an account.
static void AddDelegate(){ // Set the version, credentials, and Client Access server on ExchangeServiceBinding. ExchangeServiceBinding esb = new ExchangeServiceBinding(); esb.RequestServerVersionValue = new RequestServerVersion(); esb.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2007_SP1; esb.Credentials = new NetworkCredential("username", "password", "domain"); esb.Url = "https://example.com/ews/exchange.asmx";
// Create the request. AddDelegateType request = new AddDelegateType();
// Identify the principal's mailbox. request.Mailbox = new EmailAddressType(); request.Mailbox.EmailAddress = "user1@example.com";
// Identify the delegates who are given access to the principal's mailbox. request.DelegateUsers = new DelegateUserType[2]; request.DelegateUsers[0] = new DelegateUserType(); request.DelegateUsers[0].UserId = new UserIdType(); request.DelegateUsers[0].UserId.PrimarySmtpAddress = "user2@example.com"; request.DelegateUsers[1] = new DelegateUserType(); request.DelegateUsers[1].UserId = new UserIdType(); request.DelegateUsers[1].UserId.PrimarySmtpAddress = "user3@example.com"; // Specify the permissions that are granted to each delegate. request.DelegateUsers[0].DelegatePermissions = new DelegatePermissionsType(); request.DelegateUsers[0].DelegatePermissions.CalendarFolderPermissionLevel = DelegateFolderPermissionLevelType.Reviewer; request.DelegateUsers[0].DelegatePermissions.CalendarFolderPermissionLevelSpecified = true; request.DelegateUsers[1].DelegatePermissions = new DelegatePermissionsType(); request.DelegateUsers[1].DelegatePermissions.TasksFolderPermissionLevel = DelegateFolderPermissionLevelType.Author; request.DelegateUsers[1].DelegatePermissions.TasksFolderPermissionLevelSpecified = true; request.DelegateUsers[1].DelegatePermissions.InboxFolderPermissionLevel = DelegateFolderPermissionLevelType.Editor; request.DelegateUsers[1].DelegatePermissions.InboxFolderPermissionLevelSpecified = true;
// Specify whether the principal recieves meeting requests. request.DeliverMeetingRequests = DeliverMeetingRequestsType.DelegatesAndSendInformationToMe; request.DeliverMeetingRequestsSpecified = true;
try { // Send the request and get the response. AddDelegateResponseMessageType response = esb.AddDelegate(request); DelegateUserResponseMessageType[] responseMessages = response.ResponseMessages;
// One DelegateUserResponseMessageType exists for each attempt to add a delegate user to an account. foreach (DelegateUserResponseMessageType user in responseMessages) { Console.WriteLine("Results of adding user: " + user.ResponseClass.ToString()); Console.WriteLine(user.DelegateUser.UserId.DisplayName); Console.WriteLine(user.DelegateUser.UserId.PrimarySmtpAddress); Console.WriteLine(user.DelegateUser.UserId.SID); if (user.DelegateUser.ReceiveCopiesOfMeetingMessagesSpecified) { Console.WriteLine("Does the delegate receive copies of meeting related messages: " + user.DelegateUser.ReceiveCopiesOfMeetingMessages); } if (user.DelegateUser.ViewPrivateItemsSpecified) { Console.WriteLine("Can the delegate view private items in the principal's mailbox: " + user.DelegateUser.ViewPrivateItems); } } Console.ReadLine(); } catch (Exception e) { Console.WriteLine(e.Message); Console.ReadLine(); }}
Folder-level permissions work with other Exchange Web Services (Exchange Server 2007 SP1)
Folder-level permissions work with other Exchange Web Services operations in the following ways:
Sample Code:The following code example shows you how to set folder-level permissions when a folder is created. The authenticated user grants user3 the Editor permission level on a new folder named NewFolderWithPermissionsSet that is created in the Inbox default folder.
static void CreateFolderLevelPermissions(){ // Set the version, credentials, and the Client Access server on ExchangeServiceBinding. ExchangeServiceBinding esb = new ExchangeServiceBinding(); esb.RequestServerVersionValue = new RequestServerVersion(); esb.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2007_SP1; esb.Credentials = new NetworkCredential("username", "password", "domain"); esb.Url = "https://CAS.example.com/ews/exchange.asmx";
// Create user identifier. UserIdType user = new UserIdType(); user.PrimarySmtpAddress = "user3@example.com.com";
// Set the folder permission level to Editor. PermissionSetType permissionSet = new PermissionSetType(); permissionSet.Permissions = new PermissionType[] { new PermissionType() }; //permissionSet.Permissions[0] = new PermissionType(); permissionSet.Permissions[0].PermissionLevel = PermissionLevelType.Editor; permissionSet.Permissions[0].UserId = user;
FolderType folder = new FolderType(); folder.DisplayName = "NewFolderWithPermissionsSet"; folder.PermissionSet = permissionSet;
// Specify the target folder. DistinguishedFolderIdType inbox = new DistinguishedFolderIdType(); inbox.Id = DistinguishedFolderIdNameType.inbox; TargetFolderIdType targetFolder = new TargetFolderIdType(); targetFolder.Item = inbox;
CreateFolderType request = new CreateFolderType(); request.Folders = new FolderType[] { folder }; request.ParentFolderId = targetFolder;
try { // Send the request and get the response. CreateFolderResponseType response = esb.CreateFolder(request);
// Get the response messages. ResponseMessageType[] rmta = response.ResponseMessages.Items;
// Cast to appropriate response message type. if (((FolderInfoResponseMessageType)rmta[0]).ResponseClass == ResponseClassType.Success) { // Continue. } }
catch { // Handle errors. }}
Technical Architecture of Exchange Server 2007
In Exchange Server 2007 introduces several architectural changes from previous versions of Exchange. Many features and components have been redesigned, some features have been removed, and several new features have been added.
This document discusses the technical architecture of Exchange 2007, including descriptions of server roles, topologies, and the transport architecture. It is a compilation of several Exchange 2007 Help topics and is provided as a convenience for customers.
Please find the following documentation here
When i dealt with one of my customer, whose application dealt with Calendaring solution, i made this facility. Even in most of the scenarios, when we deal with Microsoft Office Outlook based calendaring solutions, what're the user action or what're the changes has made. But we have quick & smart solution for that.
By making use of logging calendar transactions feature in the MS Outlook. Because of the Calendar logging feature, calendar transactions that are generated by client features, by user actions, by the object model, or by the MAPI Calendar Table are written to a log file.
1) So what the log file will contain?
The log file contains the following information:
2) What is the main goal of the logging feature?
The main goal of the Calendar logging feature is to quickly identify situations where, for example, meetings are inexplicably deleted from a Calendar folder
For more information, please view the following article
Guide to Public Folders in Exchange Server 2007
Please find the following articles, which guides us "how-to" deal with Public folders in Exchange Server 2007.
Transport Architecture - Exchange Server 2007
Exchange Server 2007 - Database Architecture changes
The Exchange database architecture has changed in four significant respects in Exchange Server 2007: