Redemption MAPI access(c#)

E

entvex

HI every one i have coded a program can searches all our company
calendars.
and looks for tags like vacation and adds them to a database. and then
a project manager can view all the data in a web interface.

But it seem like OOM is very unstable when using olNameSpace =
olApplication.GetNamespace("MAPI");

From redemtion API
Important note: if you set this property to Namespace.MAPIOBJECT
property from the Outlook Object Model and your code is running
outside the outlook.exe address space (i.e. it is not a COM add-in)
some RDO features (RDOFolder.ACL, RDOPSTStore.PstPath,
GetSharedDefaultFolder, GetSharedMailbox, etc) will not function
properly due to bugs in the MAPI COM marshaling support.

and i make heavy use for olMAPIFolder =
olNameSpace.GetSharedDefaultFolder(olRecipient,
Outlook.OlDefaultFolders.olFolderCalendar);

i am now trying to use Redemtion

i am trying to logon to a exchnage to search calendar data

Session.LogonExchangeMailbox("(e-mail address removed)", "exch-
be.terma.com");

how do i connect ?

Greetings Entvex
 
K

Ken Slovak - [MVP - Outlook]

The Outlook object model isn't unstable in that case. As Dmitry says it's a
marshaling problem. In cases where you are running from outside the Outlook
process you use a logon instead of using NameSpace.MAPIOBJECT.

That's if there's already an Outlook profile on that machine that logs into
the mailbox you want to log into. If not you need to set that up, or you
need to use a server side version of MAPI on that machine. Then if you have
permissions on that mailbox you can use that logon. The machine would need
to have no Office installed on it and no MAPI and have the downloaded server
side MAPI installed then.

In my experience using LogonExchangeMailbox() works with the server side
MAPI and not the client side MAPI installed by Outlook.
 
D

Dmitry Streblechenko

LogonExchangeMailbox shoudl work fien with either flavor of MAPI, the rule
of thumb is to run your code as the user specified in the call to
LogonExchangeMailbox. If you then need to ope nothe ruser's mailbox, call
RDOSession.Stores.GetSharedMailbox.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
E

entvex

when i run this code to login

Redemption.RDOSession Session = new RDOSession();
try
{
Session.LogonExchangeMailbox("(e-mail address removed)",
"intern.domain.com");
}
catch (Exception)
{
}
Debug.WriteLine(Session.LoggedOn);

i get this error from the Exception
"Catastrophic failure"
do any of you have an idea why it won't logon ?

Greetins Entvex
 
Top