OpenMsgStore exception

  • Thread starter DamanPradhan via OfficeKB.com
  • Start date
D

DamanPradhan via OfficeKB.com

Hi,

I'm developing an application using MAPI (Mapi33.dll). I'm creating a temp.
profile in this fashion (using C#):
string ProfileName = Guid.NewGuid().ToString();
MAPI33.Helpers.Profile.Create(ProfileName, MAPI33.Helpers.
Profile.FLAGS.AddPrivateAndPublicStore | MAPI33.Helpers.Profile.FLAGS.
UseAdminPrivilege,ExchangeServerName, UserName, null);

The strange part is that on some systems, this line thows a username /
password login box (which is good bcoz it then logs into the Exch. Server),
and on others, it does not. On the ones that do not, I get this error on
trying to open a message store (the OpenMsgStore() function ) :
FailOneProvider. (8004011D)

Can anyone help me solve this issue ? How can we force the username /
password box to ALWAYS show itself when we try to log into the Exch. Server ?

Thanks in advance !!!
 
D

DamanPradhan via OfficeKB.com

Just noticed that the username / password box pops up on a Windows Server
2003 machine and does not on a XP system. Is there some sort of a system
setting that needs to be changed somewhere ?

Regards,
Daman
 
D

DamanPradhan via OfficeKB.com

Hi,

I just happened to come across this link which does pretty much what I want :

http://www.tech-archive.net/Archive....win32.programmer.messaging/2004-08/0057.html


Dmitry says :

"Open the global profile secition (pbGlobalProfileSectionGuid), and set
PR_PROFILE_CONFIG_FLAGS to CONFIG_SHOW_CONNECT_UI |
CONFIG_PROMPT_FOR_CREDENTIALS"

I'm a newbie to MAPI and could not pin point how to open the Global Profile
Section mentioned here. Specifically, I found OpenProfileSection() in 3
namespaces :

MapiSession, MsgServiceAdmin and ProviderAdmin.

Which of these namespaces do i use ?

Also, in calls to OpenProfileSection(), there is a UID argument that has to
be passed. Where do I get the UID from ? Also, can anyone please let me know
whats the second argument in the following API ?

public MAPI33.Error MsgServiceAdmin.OpenProfileSection(System.Guid UID,
System.Guid Interface, __MAPI33__INTERNALS__.MsgServiceAdmin.FLAGS Flags, out
MAPI33.IProfSect PrfSect)


Thanks in advance !
Daman
Just noticed that the username / password box pops up on a Windows Server
2003 machine and does not on a XP system. Is there some sort of a system
setting that needs to be changed somewhere ?

Regards,
Daman
[quoted text clipped - 15 lines]
Thanks in advance !!!
 
D

Dmitry Streblechenko

First, MAPI questions have a better chnace of being answered in teh MAPI
newsgroup (programmer.messaging).
Secondly, your code must run under the identity of the domain Windows user
who wons teh primary mailbox in the profile. Otehrwise you will get an
authentication prompt.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
DamanPradhan via OfficeKB.com said:
Hi,

I just happened to come across this link which does pretty much what I
want :

http://www.tech-archive.net/Archive....win32.programmer.messaging/2004-08/0057.html


Dmitry says :

"Open the global profile secition (pbGlobalProfileSectionGuid), and set
PR_PROFILE_CONFIG_FLAGS to CONFIG_SHOW_CONNECT_UI |
CONFIG_PROMPT_FOR_CREDENTIALS"

I'm a newbie to MAPI and could not pin point how to open the Global
Profile
Section mentioned here. Specifically, I found OpenProfileSection() in 3
namespaces :

MapiSession, MsgServiceAdmin and ProviderAdmin.

Which of these namespaces do i use ?

Also, in calls to OpenProfileSection(), there is a UID argument that has
to
be passed. Where do I get the UID from ? Also, can anyone please let me
know
whats the second argument in the following API ?

public MAPI33.Error MsgServiceAdmin.OpenProfileSection(System.Guid UID,
System.Guid Interface, __MAPI33__INTERNALS__.MsgServiceAdmin.FLAGS Flags,
out
MAPI33.IProfSect PrfSect)


Thanks in advance !
Daman
Just noticed that the username / password box pops up on a Windows Server
2003 machine and does not on a XP system. Is there some sort of a system
setting that needs to be changed somewhere ?

Regards,
Daman
[quoted text clipped - 15 lines]
Thanks in advance !!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top