Monday, 19 December 2011

MAPI_E_FAILONEPROVIDER - Could not connect to the Exchange server

MS Exchange 2010 SP1 (CAS/HT + Mailbox) - no public folders
Sage SalesLogix Exchange Link v8.0.0.1085
MAPI and CDO 1.2.1 v6.5.8244.0

Exchange Link is running on Windows 2008 R2 Datacentre and is configured to connect to the CAS server. The latest MAPI and CDO is installed on the same server. Launch Exchange Link under its service account, click on Connections tab, under Exchange section click on Verify Connection and the following message pops-up:

Could not connect to the Exchange server – MAPI_E_FAILONEPROVIDER

I used MFCMAPI to test MAPI connectivity. Open MFCMAPI, go to Session, click to Logon, and create a new profile for the Exchange Link service user. Then go to Session again, Logon and load the newly created profile. Click on the Mailbox – Username and an error pops up:


I Googled for the error and found a KBA explaining that the issue was fixed in RU4 for Exchange 2010. Then I found that SP2 for Exchange 2010 was released and that RU4 was included in it. So I installed SP2, but it did not fix the issue.

Then I realised that pre-Outlook 2007 (and obviously all 3rd party MAPI) clients will require public folders on Exchange server in order to connect. Luckily, a client can be instructed to ignore missing public folders and to connect anyway.

To test this:
1. Open MFCMAPI under the Exchange Link service account, click on Profile and Show Profiles.
2. Double-click the object that belongs to the newly created profile. A new window opens with a single object in it, double-click the object.
3. Again, a new window opens, look for the object of the newly created profile. It will have this code under the Instance Key tab: 13DBB0C8AA05101A9BB000AA002FC45A.
4. Single-click on this object and in the lower pane look for the Property Name: PR_PROFILE_CONNECT_FLAGS.
5. Change the Hex value of this property to 0x8000. The value in the Smart View should change to Flags: CONNECT_IGNORE_NO_PF.
6. Click OK and close all windows.
7. In the MFCMAPI’s main window, go to Session, Logon and load the Exchange Link’s profile, click on Mailbox – Username and all properties will be listed without any pop-up errors.

Now, to make Exchange Link work, MAPI needs to ignore the fact that there are no public folders on the Exchange server. On the server hosting Exchange Link and MAPI CDO set the following value in the registry:

If you are running a 32-bit version of Windows®, navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Messaging Subsystem\CDO.

If you are running a 64-bit version of Windows, navigate to HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows Messaging Subsystem.

If the CDO registry key does not exist, create a new registry key and name it CDO.
In the CDO registry key, if the DWORD value does not exist, create a DWORD value and name it Ignore No PF.
Change the DWORD value to 1.
Click OK.

Check if Exchange Link can connect successfully.

Changes in the newest CDO web download allow more options for CONNECT_IGNORE_NO_PF
Configure the BlackBerry Enterprise Server to run without public folders
December 2011 Release of MFCMAPI and MrMAPI
How to use MFCMAPI to create a MAPI profile to connect to Exchange 2010
Issues That Are Fixed in Exchange 2010 SP2
MAPI and Exchange 2007
"MAPI_E_FAILONEPROVIDER (0x8004011D)" error message when you access an Exchange Server 2010 mailbox by using a MAPI application
MAPI Now Likes Exchange 2010
Microsoft Exchange Server MAPI Client and Collaboration Data Objects 1.2.1
Understanding Public Folders

No comments:

Post a Comment