Interface not supported at Redemption.IRDOSession.set_MAPIOBJECT

  • Thread starter Thread starter MA
  • Start date Start date
M

MA

Hi Guys,

I have posted the similar error previously to the following thread and
thanks to "Dmitry Streblechenko", with his suggestions it was fixed by
re-installing the error.

http://groups.google.com.au/group/m...st&q=Interface+not+supported#16aa1ddd6edcf937


Now, I am randomly getting this error to different machine. Most of
the time I have fixed the error by re-starting the machine, few times
I had to re-install Outlook client as suggested by Dmitry. The test
machione where it throw the error are running Outlook 2007. Note, no
exchange server running on these box.

Debuuging shows the error throw when it attempt to set the
Redemption.MAPIOBJECT. I have confirmed the Outlook.Session.MAPIObject
not empty and also no Outlook instances running in Task Manager.

rdoSession.AuthKey = REDEMPTION_AUTH_KEY;
rdoSession.MAPIOBJECT = olFolder.Session.MAPIOBJECT; <- Fail here

Outlook client starts fine without error. Its bit painful to restart
the machine or re-installing the Outlook client. Is there any utility
(i.e. fixmapi.exe) or steps to fix it?

I have used the Outlook 2003 interop, do you think it could be a
factor?

Thanks for the advice.

Regards,
MA
 
Most often this error is cased by installing both Outlook and Exchange
version of MAPI when you install both Outlook and Exchange
Server/Admin/standaloen version of MAPI.
Is this is the case?
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
Thanks for the response. Only Outlook client installed to these
machine (we do not have the exchange server).

Sorry this is a critical issue to us, I am trying to find out an
alternative approach because its going to be difficult to explain our
customer to re-install Outlook client because of the underlying MAPI
issue.

After reviewing the redemption site (http://www.dimastr.com/
redemption/) where the documentation says:

<quote>
RDOSession object provides 3 distinct ways to log/connect to a MAPI
session: set the MAPIOBJECT property, call Logon, LogonExchangeMailbox
or LogonPstStore methods.
</quote>


I implemented the following work-around which seems to fix. Basically
the code attempt to set the MAPIOBJECT, if its fails then it try to
use the LogonPstStore() method. The work-around code works on the
machine where it fails to set the MAPIOBJECT.

<work-around>
try
{
rdoSession.MAPIOBJECT =
olFolder.Session.MAPIOBJECT;
}
catch (System.Exception ex)
{
if (pstPath != string.Empty)
rdoSession.LogonPstStore(pstPath, 1, "", "", 0);

if (rdoSession.MAPIOBJECT == null)
throw new System.ApplicationException(ex.Message);
}
</work-around>

Do you have any comments about the work-around approach?

Regards,
MA
 
That does not fix the underlying problem: one way or another, MAPI
marshalling is broken and needs to bee fixed.
Did your customer ever had the standalone version of MAPI or the Exchange
Admin installed?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
We can re-produce this to one of our in-house test machine where only
the Outlook 2007 client installed (no exchange).

Regards,
MA
 
Sorry for the delay.

We haven't reinstall Outlook Client 2007 to the test machine yet.
Months ago when we had similar issue to another machine, the issue
went away when we reinstalled the Outlook Client.

That does not fix the underlying problem: one way or another, MAPI
marshalling is broken and needs to bee fixed.

It appear our workaround of use LogonPstStore()/Logon() when setting
the MAPIOBJECT fails, works on the test machine. Outlook Client also
working fine. Are there any known issue if the Outlook client not
reinstall?

Regards,
MA
 
You will be fine as long as no MAPI marshalling is used (which is used when
Namespace.MAPIOBJECT is marshalled from the outlook.exe address space to
your app's address space).
The problems begin when IMAPISession returned by Namespace.MAPIOBJECT is
created by the Outlook version of MAPI, but the Exchange version of MAPI is
registered to do the marshalling (which will obviously fail).

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