• Sign in
 
  •  
  • MSDN Blogs
  • Microsoft Blog Images
  • More ...

  • Blog Home
  • About
  • Email Blog Author
  • Share this
  • RSS for posts
  • Atom
  • RSS for comments
  • CDO (26)
  • Code Snippet (43)
  • Custom Providers (17)
  • Debugging (8)
  • DevMsgTeam (317)
  • Documentation (117)
  • DST (8)
  • EWS (8)
  • Exchange (115)
  • Gotchas (102)
  • Hotfix (29)
  • MAPI (254)
  • MAPI Download (56)
  • MFCMAPI (107)
  • MSDN (59)
  • Non Dev (11)
  • OOM (17)
  • Outlook (182)
  • Outlook 2007 Auxiliary Reference (45)
  • Outlook Integration API (12)
  • Protocol Docs (20)
  • PST/OST (24)
  • Referrals (8)
  • Vista (12)
  • WrapPST (19)
Links:
  • Download MFCMAPI
  • MFCMAPI on Facebook
  • Troubleshooting Outlook Crashes
  • Office Update Center
  • Developer Messaging Team Blog
This site is provided "AS IS" with no warranties, and confers no rights. Use of included code samples are subject to the terms specified in the Terms of Use.
Archives
  • August 2014 (1)
  • May 2014 (2)
  • April 2014 (1)
  • March 2014 (1)
  • February 2014 (1)
  • January 2014 (2)
  • December 2013 (2)
  • November 2013 (2)
  • October 2013 (2)
  • August 2013 (2)
  • May 2013 (5)
  • April 2013 (1)
  • March 2013 (2)
  • February 2013 (2)
  • January 2013 (2)
  • December 2012 (4)
  • November 2012 (2)
  • October 2012 (2)
  • September 2012 (1)
  • August 2012 (3)
  • June 2012 (2)
  • May 2012 (1)
  • April 2012 (3)
  • March 2012 (3)
  • February 2012 (3)
  • January 2012 (1)
  • December 2011 (3)
  • November 2011 (1)
  • October 2011 (3)
  • September 2011 (1)
  • August 2011 (1)
  • July 2011 (4)
  • June 2011 (3)
  • May 2011 (3)
  • April 2011 (3)
  • March 2011 (5)
  • February 2011 (1)
  • January 2011 (2)
  • December 2010 (1)
  • November 2010 (4)
  • October 2010 (1)
  • September 2010 (3)
  • August 2010 (5)
  • July 2010 (3)
  • June 2010 (3)
  • May 2010 (1)
  • April 2010 (3)
  • March 2010 (3)
  • February 2010 (3)
  • January 2010 (2)
  • December 2009 (3)
  • November 2009 (5)
  • October 2009 (4)
  • September 2009 (5)
  • August 2009 (5)
  • July 2009 (11)
  • June 2009 (6)
  • May 2009 (5)
  • April 2009 (3)
  • March 2009 (18)
  • February 2009 (10)
  • January 2009 (3)
  • December 2008 (2)
  • November 2008 (2)
  • October 2008 (5)
  • September 2008 (4)
  • August 2008 (10)
  • July 2008 (6)
  • June 2008 (8)
  • May 2008 (2)
  • April 2008 (4)
  • March 2008 (2)
  • February 2008 (2)
  • January 2008 (5)
  • December 2007 (3)
  • November 2007 (2)
  • October 2007 (3)
  • September 2007 (1)
  • August 2007 (4)
  • July 2007 (5)
  • June 2007 (3)
  • May 2007 (4)
  • April 2007 (1)
  • March 2007 (6)
  • February 2007 (3)
  • January 2007 (2)
  • December 2006 (4)
  • November 2006 (3)
  • October 2006 (1)
  • August 2006 (1)
  • June 2006 (5)
  • May 2006 (5)
  • December 2005 (1)
  • November 2005 (4)
  • October 2005 (2)
  • September 2005 (1)
  • April 2005 (3)
  • December 2004 (2)
  • September 2004 (2)
  • August 2004 (3)
  • July 2004 (3)

Exchange and Outlook On The Same Machine

MSDN Blogs > SGriffin's MAPI Internals > Exchange and Outlook On The Same Machine

Exchange and Outlook On The Same Machine

Rate This
Stephen Griffin - MSFT
3 Jul 2004 12:12 AM
  • Comments 23

I was hoping to post something less controversial for my first blog entry, but this issue came up again recently and I felt I had to address it.

I'm frequently asked why I we don't support putting Outlook and Exchange on the same machine. One response I typically hear is “But I run both on my machine and never have a problem”. In this post, I'll attempt to clarify a few things and explain what kinds of problems you can expect when you put Outlook and Exchange on the same server.

A couple definitions - shorthand mainly:

Admin: The Exchange Administrator (5.5) or the Exchange System Manager (2000 and 2003).

MAPI: Used by iself, refers to Extended MAPI. I'll spell out Simple MAPI when I need to make a distinction.

The main thing to clear up is that the warning against putting the Outlook and Exchange on the same machine applies primarily to servers and other mission critical machines. Basically, if your server hosts an application which uses MAPI, you should never install Outlook on it.

So why do the articles make a point to say not combine the Admin and Outlook? The answer is because there are a large number of server applications out there which rely on MAPI for integration with Exchange. Examples include voicemail, PDA synchronization, workflow, archival, legal discovery and connectors (gateways) to third party mail/database systems. The recommended method for installing MAPI onto a server for one of these applications is to install the Admin.

Here's a (greatly simplified) synopsis of MAPI's architecture. The core file is mapi32.dll. After loading MAPI, applications then open message stores and address books. These are implemented by providers. The providers which allows MAPI to talk to Exchange and the directory are emsmdb32.dll and emsabp32.dll.

MAPI was designed so that anyone could implement the core component and providers. A few companies did choose to implement the Simple MAPI portion of the API in their own mapi32.dll, but AFAIK, the only currently available implementations of the Extended MAPI portion of the API are those shipped by Outlook and Exchange. A key flaw in the original MAPI design is that it did not allow for multiple implementations to coexist.

Life would be very simple if the mapi32, emsmdb32 and emsabp32 shipped by Outlook and Exchange were the same implementation, built out of the same code tree. If that were the case, the only concern would be keeping up with the latest builds.

However, life is not this simple. Outlook and Exchange have different needs from MAPI, and, as such, the code for their implementations has diverged a good deal. Exchange needs high stability and scalability out of MAPI, so a good portion of the design and testing is focused on eliminating potential deadlocks and memory leaks. Outlook needs a strong user experience, so the focus is on features like Cancel RPC, RPC over HTTP, Cached Mode, and server reconnect. Outlook also needed to solve the coexistence problem to allow for other mail clients, so enter the MAPI Stub.

The stub library works by acting as a central dispatcher for MAPI calls, proxying the calls out to the various implementations of MAPI which may be on the box. There's a performance penalty to the stub library's proxying mechanism though. This performance penalty was not acceptable in a server environment, so Exchange declined to support their implementation of MAPI with the stub. The effect of all this is that Exchange's providers expect to be loaded by Exchange's MAPI, and Outlook's providers expect to be loaded by Outlook's MAPI. We can't guarantee this will be the case if both are installed on the same box.

I began this post promising to list some concrete examples of the problems this can cause. These are real issues I've encountered as an Escalation Engineer:

  • Missing interfaces - Exchange has recently extended the IExchangeManageStore interface to allow the Admin to provide listings of over 65000 mailboxes and public folders. The new interfaces required for this are not in Outlook's Emsmdb32.
  • Memory leaks and deadlocks - Outlook's MAPI trails far behind Exchange's MAPI in shipping fixes for issues which can show in high stress multithreaded MAPI applications. This is not suprising considering the level of testing Exchange's implementation gets, not only internally but by third parties. Quite often, we get calls from our partners saying that “the latest fix didn't work” - that their customer is still seeing a leak/deadlock/transient hang that should have been fixed by a recent hotfix. On investigation, we'll find that some administrator at the customer's site had installed Outlook on the application server “just for testing“, essentially forcing the application to run in an environment where it was never previously tested.
  • Stub dependencies Lead to Crashes - Just found this one last week. The Outlook stub library works great with Simple MAPI, which has only 12 functions, each with a well defined DLL entry points. Proxying Extended MAPI calls is much more complex - more places to fail. In the scenario I debugged, Outlook's stub failed to locate the entry points for some functions in Exchange's Emsmdb, so the function pointers were left NULL, leading to a crash when we tried to invoke the functions. I believe the setup was Exchange 2000 with Outlook 2000.
  • Simple MAPI - I just mentioned the stub library works great with Simple MAPI, but it can't work at all if Simple MAPI isn't there. As of Exchange 2003, Exchange no longer implements Simple MAPI. The API was removed to reduce the potential attack surface.
  • Rpc_Binding_Order - Installing Outlook on an Exchange cluster will prevent mad.exe from logging on. The Exchange release notes only indicate Freebusy won't work, but that's just one effect of mad.exe failing. Any other MAPI based program could fail in this scenario as well.

Of course, most of these problems could be solved (any problem can be solved, right?), and the stub library is a good first step, but committing to support of this configuration would greatly expand the test matrices of both Exchange and Outlook, not to mention the increased test burden for third party server applications using MAPI. Unfortunately, we've not been able to justify the cost this would entail.

So, can you put Outlook and the Exchange Admin on the same box? If you're just talking about an administrator's desktop, one which can be rebooted on a whim or even rebuilt if needed, where downtime isn't a big issue, sure - it still won't be supported, but you might get away with it. If you're talking about your Exchange server or a server hosting an application integrated with Exchange, you do so at your own peril.

[Comments on this post have been closed]

  • 23 Comments
Exchange, Outlook, MAPI, Gotchas, DevMsgTeam
  • You Had Me At EHLO...
    5 Jul 2004 9:23 AM
  • Venkat Ramisetty
    30 Jul 2004 3:45 AM
    This article clarified quiet a few doubts i used have and thanks a lot Steve.
  • andy
    30 Jul 2004 5:40 PM
    I don't see how re-joining the models increases third party test matrices. From a third party perspective, we get every bit as much pressure to run /on/ the exchange server as we do to run /not on/ the exchange server. That means we have to test with both versions of MAPI exhaustively - double the load, not less.
  • Stephen Griffin
    30 Jul 2004 5:58 PM
    I'm not sure what sort of product you develop, so you may be right for your case. However, most server side MAPI applications that put a big stress on MAPI run on Exchange based systems, not Outlook based systems. So companies developing those applications don't test with Outlook and don't have many customers who run their applications with Outlook. And the bulk of the issues we see with MAPI under stress are discovered in the wild, not in test labs. This leads to more reports coming in for Exchange's MAPI, leading in turn to a more stable implementation. It's kinda like evolution.

    Also, I think you missed my point about putting Outlook and Exchange on the same server increasing the test matrix - it's not double - it's exponential. The reason is you don't have a good guarantee which version of each file you're gonna load - you might get Exchange's emsmdb32 with Outlook's emsabp32 with Exchange's emsui32x with Outlook's mapi32, etc. And then multiply that by all the versions of Outlook someone could have installed on all the versions of Exchange.
  • SGriffin's [MSFT] WebLog
    17 Aug 2004 2:40 PM
  • SGriffin's [MSFT] WebLog
    20 Aug 2004 4:05 PM
  • Michael's meanderings...
    14 Sep 2004 8:11 AM
  • SGriffin's [MSFT] WebLog
    8 Oct 2004 9:36 PM
  • SGriffin's [MSFT] WebLog
    8 Oct 2004 9:36 PM
  • SGriffin's [MSFT] WebLog
    8 Aug 2005 3:18 PM
    This post was inspired by a case I worked recently. In this case, the customer was using the 5.5 Event...
  • SGriffin's [MSFT] WebLog
    8 Aug 2005 3:18 PM
    I'm working on a followup to my memory management article and a writeup on a MAPI deleted profile bug...
  • GThompson
    8 Feb 2006 11:37 AM
    How do you correct the situation if you have Outlook installed on an Exchange 2003 server?  I assume uninstalling Outlook would remove the MAPI dll and break Exchange!?
  • Stephen Griffin - MSFT
    8 Feb 2006 11:47 AM
    My recommendation is always to rebuild the server from scratch. I would never trust an Exchange server that has had Outlook installed on it.

    If you do try to go the uninstall route you'll need to at least rerun the exchange installation and reapply service packs.
  • The CDOs and CDONTS of Messaging Development
    3 Aug 2006 2:07 PM
    You can now download the MAPI subsystem and CDO 1.21 from Microsoft and install them separate from Exchange...
  • The CDOs and CDONTS of Messaging Development
    20 Oct 2006 11:53 AM

    This is from an email I send out this morning after a discussion about CDO 1.21 and the Exchange store

Page 1 of 2 (23 items) 12
  • © 2014 Microsoft Corporation.
  • Terms of Use
  • Trademarks
  • Privacy & Cookies
  • Report Abuse
  • 5.6.426.415