|
|
|
date: Mon, 7 Apr 2008 14:26:48 +0100,
group: microsoft.public.exchange.development
back
Re: Error MAPI_E_NOT_FOUND accessing PF Store from C#
"JamesB" wrote in
news:47fa20d3$0$32043$da0feed9@news.zen.co.uk:
> oSession.Logon(mv, mv, false, true, 0, true, pi);
> [....]
> Any idea why I cannot access the PF store?
>
> I assume it's the way I am logging on... any clues appreciated.
That's because dynamic profiles don't support public folders, basically
-- you're telling CDO1.21 (oh, and don't forget that isn't supported in
.Net, see http://support.microsoft.com/kb/813349) to create a temporary
folder pointing at the mailbox you pass in.
So the system does exactly that, but the temporary profile _only_
contains the message service for the mailbox. To get at public folders,
you'll have to log into a real profile which has the public folder service
in there.
-- dan
date: Mon, 07 Apr 2008 07:29:23 -0700
author: Dan Mitchell
Re: Error MAPI_E_NOT_FOUND accessing PF Store from C#
"Dan Mitchell" wrote in message
news:Xns9A79565AA4017djmitchellayahoocom@207.46.248.16...
> "JamesB" wrote in
> news:47fa20d3$0$32043$da0feed9@news.zen.co.uk:
>> oSession.Logon(mv, mv, false, true, 0, true, pi);
>> [....]
>> Any idea why I cannot access the PF store?
>>
>> I assume it's the way I am logging on... any clues appreciated.
>
> That's because dynamic profiles don't support public folders, basically
> -- you're telling CDO1.21 (oh, and don't forget that isn't supported in
> .Net, see http://support.microsoft.com/kb/813349) to create a temporary
> folder pointing at the mailbox you pass in.
>
> So the system does exactly that, but the temporary profile _only_
> contains the message service for the mailbox. To get at public folders,
> you'll have to log into a real profile which has the public folder service
> in there.
>
Thanks - figured it was probably something along those lines...
I have outlook on the machine so I can do that, the question then is, can I
create a "real" profile without something like Outlook being installed?
date: Mon, 7 Apr 2008 15:41:02 +0100
author: JamesB
Re: Error MAPI_E_NOT_FOUND accessing PF Store from C#
Hi Dan,
> "JamesB" wrote in
> news:47fa20d3$0$32043$da0feed9@news.zen.co.uk:
>> oSession.Logon(mv, mv, false, true, 0, true, pi);
>> [....]
>> Any idea why I cannot access the PF store?
>>
>> I assume it's the way I am logging on... any clues appreciated.
>
> That's because dynamic profiles don't support public folders,
> basically -- you're telling CDO1.21 (oh, and don't forget that isn't
> supported in .Net, see http://support.microsoft.com/kb/813349) to
> create a temporary folder pointing at the mailbox you pass in.
You are correct about the unsupported CDO part but aside from
that you should be pretty much see the public folder store no
matter if you are using an explicit or dynamic profile.
I use it in several scenarios.
I could think of two reasons why you have no public folder
access:
1) you connect to Exchange 2007 which might have been
installed without any PF
2) your mailbox is living in an Exchange Server which has
a PF database but the PF content is not replicated to that
server.
So in case of 2) you might need to create a mailbox on a
server which has PF database with all content. You will need
to add your windows account on that mailbox to give it
send-as and receive-as permissions. Thats enough to
logon to that mailbox. Now you should see the PF content
as well.
--
SvenC
date: Mon, 7 Apr 2008 19:06:06 +0200
author: SvenC am
Re: Error MAPI_E_NOT_FOUND accessing PF Store from C#
The standalone version of MAPI (which is PF-less servers aware) does not add
the PF store to the list of the session stores
(IMAPISession::GetMsgStoresTable) until it has a chance to hit the server
(i.e. open the primary mailbox) to verify that the PF store actually exists.
Unfortunately CDO 1.21 caches the list of stores when Logon is called and
will never refresh it no matter what.
Try to create a second instance of MAPI.Session and set its MAPIOBJECT
property to that of the first instance after your code accessed the primary
store using the first instance of the session object.
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"SvenC" <SvenC@nospam.nospam> wrote in message
news:C0F60CEB-C495-446B-845A-BC56B2E74364@microsoft.com...
> Hi Dan,
>
>> "JamesB" wrote in
>> news:47fa20d3$0$32043$da0feed9@news.zen.co.uk:
>>> oSession.Logon(mv, mv, false, true, 0, true, pi);
>>> [....]
>>> Any idea why I cannot access the PF store?
>>>
>>> I assume it's the way I am logging on... any clues appreciated.
>>
>> That's because dynamic profiles don't support public folders,
>> basically -- you're telling CDO1.21 (oh, and don't forget that isn't
>> supported in .Net, see http://support.microsoft.com/kb/813349) to
>> create a temporary folder pointing at the mailbox you pass in.
>
> You are correct about the unsupported CDO part but aside from
> that you should be pretty much see the public folder store no
> matter if you are using an explicit or dynamic profile.
> I use it in several scenarios.
>
> I could think of two reasons why you have no public folder
> access:
> 1) you connect to Exchange 2007 which might have been
> installed without any PF
> 2) your mailbox is living in an Exchange Server which has
> a PF database but the PF content is not replicated to that
> server.
>
> So in case of 2) you might need to create a mailbox on a
> server which has PF database with all content. You will need
> to add your windows account on that mailbox to give it
> send-as and receive-as permissions. Thats enough to
> logon to that mailbox. Now you should see the PF content
> as well.
>
> --
> SvenC
date: Mon, 7 Apr 2008 13:41:08 -0700
author: Dmitry Streblechenko
Re: Error MAPI_E_NOT_FOUND accessing PF Store from C#
Hi Dmitry,
> What is your code that sets the MAPIOBJECT property? You really need
> to make sure that the first session opens the primary store. Opening
> the Inbox folder and reading the number of messages there should do
> the trick.
I missed the part of accessing the inbox. You are correct, when I use this
one:
logonTest.vbs:
Dim oCDO, s
Set oCDO = createobject("mapi.session")
ocdo.Logon , , 0, -1, 0, -1, "exServer" + chr(10) + "mailAlias"
s = ocdo.inbox.name ' this line important
Dim oCDO2
Set oCDO2 = CreateObject("mapi.session")
ocdo2.MAPIOBJECT = ocdo.MAPIOBJECT
Msgbox ocdo2.InfoStores.Count ' here I get 2
--
SvenC
date: Tue, 8 Apr 2008 08:13:30 +0200
author: SvenC am
|
|