MAPI Store Accessor error message on some machines

Add-in Express™ Support Service
That's what is more important than anything else

MAPI Store Accessor error message on some machines
When Outlook starts, an error message is displayed 
Bargholz Thomas




Posts: 242
Joined: 2006-12-18
Hi,
I have a solution where I'm using MAPI Store Accessor to monitor events such as copy item or new item for certain folders.
I initialize the component on startup, and close it again at shurt down:

private void adxOutlookEvents_Startup(object sender, EventArgs e)
{
// other code...
adxmapiStoreAccessor1.Initialize(false);
}
private void OfficeAddIn_AddinBeginShutdown(object sender, EventArgs e)
{
adxmapiStoreAccessor1.LogOff();
}


And on most computers this works perfectly. But on a few the user constantly recieve an error message when Outlook starts.
The problem occurs on both Windows XP and Server 2003, both with Outlook 2007. All in latest patch level.
Here is the text from the messagebox:

Detailed technical information follows:
---
Date and Time: 08-02-2010 11:04:58
Machine Name: TEAMSHAREDEMO
IP Address: 168430090
Current User: DEMO\administrator

Application Domain: C:\Program Files\Lector\TeamShare\2.0\OfficeClient\
Assembly Codebase: file:///C:/Program Files/Lector/TeamShare/2.0/OfficeClient/AddinExpress.MAPI.DLL
Assembly Full Name: AddinExpress.MAPI, Version=2.3.219.2008, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 2.3.219.2008
Assembly Build Date: 05-02-2010 12:57:08

Exception Source: AddinExpress.MAPI
Exception Type: AddinExpress.MAPI.LogonException
Exception Message: The logon did not succeed, either because one or more of the parameters to MAPILogonEx were invalid or because there were too many sessions open already.
Exception Target Site: MAPIWrapper.Initialize
Object reference not set to an instance of an object.

What could be the cause of this?
Regards
Thomas
Posted 08 Feb, 2010 04:24:49 Top
Bargholz Thomas




Posts: 242
Joined: 2006-12-18
Additional information:
I found an old forum topic regarding the same problem, and there you suggested moving the initialization code to AddinModule_AddinStartupComplete. So I've tried this, but the same problem occured.

See: http://www.add-in-express.com/forum/read.php?FID=5&TID=3461
Posted 08 Feb, 2010 06:52:53 Top
Heinz-Josef Bomanns




Posts: 206
Joined: 2008-02-28
Bargholz Thomas writes:
Exception Message: The logon did not succeed, either because one or more of the parameters to MAPILogonEx were invalid or because there were too many sessions open already.

Maybe the Profiles or PSTs or something else of those users is password protected?
__________________
Greetings, HJB
Posted 08 Feb, 2010 10:43:34 Top
Bargholz Thomas




Posts: 242
Joined: 2006-12-18
We have a demo version here which gives that error, and the demouser is not password protected beyon normal AD password, so I think it's doubtful that's the reason.
Posted 09 Feb, 2010 02:37:52 Top
Eugene Astafiev


Guest


Hello Thomas,

Do you use an exchange account in the profile or POP3/IMAP?
Posted 09 Feb, 2010 03:04:43 Top
Bargholz Thomas




Posts: 242
Joined: 2006-12-18
Hi Eugene,
all users are Exchange accounts
Posted 09 Feb, 2010 03:25:22 Top
Bargholz Thomas




Posts: 242
Joined: 2006-12-18
I've changed the code to create a new MAPI session, to see if that changes anything.

adxmapiStoreAccessor1.Initialize(true);

On the computers that world already, it made no changes.
On the computers that didn't work, I now get a new error message:

Detailed technical information follows:
---
Date and Time: 09-02-2010 10:51:51
Machine Name: TEAMSHAREDEMO
IP Address: 168430090
Current User: DEMO\administrator

Application Domain: C:\Program Files\Lector\TeamShare\2.0\OfficeClient\
Assembly Codebase: file:///C:/Program Files/Lector/TeamShare/2.0/OfficeClient/AddinExpress.MAPI.DLL
Assembly Full Name: AddinExpress.MAPI, Version=2.3.219.2008, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 2.3.219.2008
Assembly Build Date: 05-02-2010 12:57:08

Exception Source: AddinExpress.MAPI
Exception Type: System.NullReferenceException
Exception Message: Object reference not set to an instance of an object.
Exception Target Site: MAPIWrapper.Subscribe
Object reference not set to an instance of an object.
Posted 09 Feb, 2010 04:08:03 Top
Bargholz Thomas




Posts: 242
Joined: 2006-12-18
More info: We've tested some more, and a user who has the problem on one computer, does not have it on another. So it may be related to the computer and not the user. We'll continue testing along this path...
Posted 09 Feb, 2010 08:49:57 Top
Bargholz Thomas




Posts: 242
Joined: 2006-12-18
After some testing we have discovered the following about the issue:

User 1 on PC 1 recieves the errormessage.
User 1 on PC 2 does not.
User 2 on PC 1 does not.
User 2 on PC 2 does not.

We have two users and two PC's that have this problem, and both follow the same pattern.
So it appears that the combination of a specific user on a specific PC gives the problem.
What in a users profile could prevent the MAPI logon?

We're thinking that the solution is to delete the profile from the PC, but the users have roaming profiles, so our customer is a bit reluctant to just delete (and recreate) the profile. A local prodile is okay, but a roaming profile may cause problems for other systems and solutions.
Can you offer any advise on the subject?

Regards
Thomas
Posted 10 Feb, 2010 06:40:51 Top
Eugene Astafiev


Guest


Hello Thomas,

Nope. Hmmm... I haven't met such an issue before. Well, I think the cause of the issue lies in the settings of the user profile. Please try playing with its (a user profile) properties or try changing user properties on the exchange server side.
Posted 12 Feb, 2010 06:37:12 Top