Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Redemption MAPI access(c#) (http://www.outlookbanter.com/outlook-vba/100778-redemption-mapi-access-c.html)

entvex March 8th 10 10:02 AM

Redemption MAPI access(c#)
 
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("OutlookCalendarSvc@t erma.com", "exch-
be.terma.com");

how do i connect ?

Greetings Entvex

Ken Slovak - [MVP - Outlook] March 8th 10 01:45 PM

Redemption MAPI access(c#)
 
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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"entvex" wrote in message
...
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("OutlookCalendarSvc@t erma.com", "exch-
be.terma.com");

how do i connect ?

Greetings Entvex



Dmitry Streblechenko March 8th 10 05:35 PM

Redemption MAPI access(c#)
 
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
-
"Ken Slovak - [MVP - Outlook]" wrote in message
...
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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"entvex" wrote in message
...
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("OutlookCalendarSvc@t erma.com", "exch-
be.terma.com");

how do i connect ?

Greetings Entvex





entvex March 9th 10 08:01 AM

Redemption MAPI access(c#)
 
when i run this code to login

Redemption.RDOSession Session = new RDOSession();
try
{
",
"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

Dmitry Streblechenko March 9th 10 11:40 PM

Redemption MAPI access(c#)
 
What are the exception details?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"entvex" wrote in message
...
when i run this code to login

Redemption.RDOSession Session = new RDOSession();
try
{
",
"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





All times are GMT +1. The time now is 11:36 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com