Previous Topic

Next Topic

Book Contents

MAPI_E_LOGON_FAILED

MAPI Error Number -2147221231

CDO Error Number -2147746065

The information in this article applies to: Collaboration Data Objects (CDO), versions 1.1, 1.2, 1.21

If it fails, the most likely reason is that you do not have an open session.

SYMPTOMS

-or-

CAUSE

Here are 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.

RESOLUTION

The following resolutions match the causes listed in the CAUSE section.

1. 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 attempt to use a server resource (for example, an Outbox or an Inbox) for the first time, you get 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.)

2. 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.

See Also

Troubleshooting

MAPI & CDO Errors

MAPI_E_ACCOUNT_DISABLED

MAPI_E_BUSY

MAPI_E_CALL_FAILED

MAPI_E_DISK_ERROR

MAPI_E_DISK_FULL

MAPI_E_FAILONEPROVIDER

MAPI_E_INVALID_ACCESS_TIME

MAPI_E_INVALID_WORKSTATION_ACCOUNT

MAPI_E_NETWORK_ERROR

MAPI_E_NO_SUPPORT

MAPI_E_NOT_ENOUGH_DISK

MAPI_E_NOT_ENOUGH_MEMORY

MAPI_E_NOT_ENOUGH_RESOURCES

MAPI_E_NOT_FOUND

MAPI_E_NOT_ME

MAPI_E_PASSWORD_CHANGE_REQUIRED

MAPI_E_PASSWORD_EXPIRED

MAPI_E_UNABLE_TO_ABORT

MAPI_E_UNCONFIGURED

MAPI_E_UNKNOWN_FLAGS

MAPI_E_VERSION