Article ID: 180172 - Last Review: June 24, 2004 - Revision: 4.0

PRB: "Login has failed" Error Using the MAPISession Control

This article was previously published under Q180172
Expand all | Collapse all

SYMPTOMS

When calling the SignOn method of the MAPISession control, the following error may occur:
Run-Time Error '32003' Login has failed.

CAUSE

The LogonUI property of the MAPISession control is set to False and the UserName property of the control contains an invalid profile name or is empty.

RESOLUTION

Set the UserName Property of the MAPISession control equal to a profile name that exists on the machine before the SignOn method of the control is called.

STATUS

This behavior is by design.

MORE INFORMATION

The MAPI 1.0 specification requires a profile to log on to a messaging session. The MAPISession control was written before the MAPI 1.0 specification was established. In order to use this control to establish a MAPI 1.0 session and prevent the Choose Profile dialog box from being displayed, the Username property must be used to pass the name of the profile needed to sign on.

APPLIES TO
  • Microsoft Visual Basic 6.0 Learning Edition
  • Microsoft Visual Basic 6.0 Professional Edition
  • Microsoft Visual Basic 6.0 Enterprise Edition
  • Microsoft Visual Basic 4.0 Standard Edition
  • Microsoft Visual Basic 4.0 Enterprise Edition
Keywords: 
kbprb KB180172
 

Article Translations