PRB: MAPI_E_LOGON_FAILED When Calling Logon Method (178390)
The information in this article applies to:
- Microsoft Visual InterDev 1.0
- Collaboration Data Objects (CDO) 1.1
- Collaboration Data Objects (CDO) 1.2
This article was previously published under Q178390 SYMPTOMS
You are unable to logon to Exchange Server when calling the logon method of
the Collaboration Data Objects (CDO) Session object in an Active Server
Page. The following error is generated:
"MAPI_E_LOGON_FAILED"
(NOTE: CDO was formerly known as Active Messaging.)
CAUSE
If an invalid profile name is entered, the error will be generated. The
logon method must refer to an existing profile or must create a new
profile. In most cases in an ASP, it is best to code the Logon method so
that it creates a profile. The profile that is created is temporary and can
be deleted when the CDO Session is ended.
In order for an existing profile to be available on the server (where the
logon method is executed), the user you are authenticated as when you
connect to the IIS machine must be logged on interactively on the server.
This occurs because the Logon method searches the HKEY_CURRENT_USER key for
the profile being requested. When IIS logs you onto the server, it is
simply impersonating your user's security context and your profiles are not
loaded into HKEY_CURRENT_USER.
RESOLUTION
The way to create a new profile is to use the following syntax (this code
should be on one line):
objSess.Logon "", "", False, True, 0, True, "exchangeServerName" & vbLF & "exchangeE-MailName"
STATUS
This behavior is by design.
REFERENCES
For more information about the parameters passed to the Logon method,
please see the Online Help for Active Messaging and the "Logon Method
(Session Object)" topic under Collaboration Data Objects in the Microsoft
Developer Network Library (MSDN).
For the latest Knowledge Base articles and other support information on
Visual InterDev and Active Server Pages, please see the following page on
the Microsoft Technical Support site:
Modification Type: | Major | Last Reviewed: | 5/2/2006 |
---|
Keywords: | kbprb kbWebServer KB178390 |
---|
|