Microsoft KB Archive/181739

= Troubleshooting CDO (1.x) error MAPI_E_LOGON_FAILED (80040111) =

Article ID: 181739

Article Last Modified on 6/30/2005

-

APPLIES TO


 * Microsoft Collaboration Data Objects 1.21
 * Microsoft Collaboration Data Objects 1.1
 * Microsoft Collaboration Data Objects 1.2

-



This article was previously published under Q181739



SYMPTOMS
This article discusses some of the causes and resolutions for the following error messages pertaining to CDO (1.1, 1.2, 1.21):

Collaboration Data Objects error '000004f9'

The information store could not be opened.

[MAPI 1.0 - [MAPI_E_LOGON_FAILED(80040111)]]

-or-

401.1 Unauthorized: Logon Failed



CAUSE
Here are four possible reasons for this error:
 * 1) You are trying to access a mailbox that does not exist or you are using invalid logon information.
 * 2) You have insufficient rights on the Exchange mailbox.
 * 3) If you are running code in an Active Server Page (ASP), you may have insufficient rights on the Microsoft Internet Information Server (IIS) computer.
 * 4) You are relying on password synchronization in Microsoft Internet Information Server (IIS) version 4.0 to authenticate the Anonymous User specified in IIS.



RESOLUTION
The following resolutions match the causes listed in the CAUSE section.  If you are passing a profile name in your logon line, make sure the profile exists on the computer where the logon line runs. For a Visual Basic application running on a client, the profile must exist on the client running the application. If you are running a Web application, you should use the ProfileInfo parameter on the Logon method to create a profile programmatically instead of specifying a profile name.

When logging on to a mailbox from a server application (for example, an ASP running under IIS), be sure that you pass False for the ShowDialog parameter. Failure to do so could result in a MAPI_E_LOGON_FAILED error if you pass any invalid parameters.

If you are passing a ProfileInfo as part of your logon line, check the name of the mailbox and Exchange server to make sure they exists, and that the Exchange server is up.

Note The Logon method can succeed even when using a resource that does not exist or invalid parameters. When you try to use a server resource (for example, an Outbox or an Inbox) for the first time, you receive the error shown in the "Symptoms" section. To verify that you have logged onto a valid Exchange mailbox, check the CurrentUser property of the CDO (1.1, 1.2, 1.21) Session object. This does not verify your permissions to that mailbox.) To logon to a mailbox, you have to specify the owner of the mailbox as someone that has an account on the Windows NT Domain, or someone that has logon permissions to that mailbox. The account that you are logged into under IIS must have "Log on Locally" rights to the IIS computer. The account must be granted this right explicitly, or be part of a local group that has "Log on Locally" rights. These rights are granted through the "User Manager" on the IIS computer. Internet Information Server (IIS) version 4.0 has an additional feature that allows for password synchronization between IIS 4.0 and the computer user accounts. Password synchronization should only be used with user accounts defined on the local computer, not with user accounts on remote computers. This feature will not work to authenticate an anonymous user to a remote Exchange server.

To turn off password synchronization, following these steps:  Right-click the virtual directory in question. Click Properties.</li> Click the Directory Security tab.</li> Click Allow Anonymous Access.</li> Click Edit.</li> Click to clear the Enable Automatic Password Synchronization option.</li> Click OK two times, and then click Apply to save the settings.</li></ol> </li></ol>

Keywords: kbbug kbmsg kbprb kbfaq kbpending KB181739

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.