Derek,
1. You aren't going to get around the outlook security dialog. It's put
there to indicate to the user that someone is trying to access the mailbox
without them knowing. I can't say I am too fond of this, but I can
understand the reason. You ^might^ be able to get around this by setting up
the exchange server to accept it. Check out the knowledge base article
263297, titled "Administrator information about the Outlook E-mail Security
update: June 7, 2000" located at (watch for line wrap):
http://support.microsoft.com/default...b;EN-US;263297
2. Can you show the code you are using to log in? Even though you have
admin privledges, you might not be indicating correctly who you want to log
in as.
3. I don't see why you couldn't use it. Can you show the knowledge base
article?
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mvp@spam.guard.caspershouse.com
"Noonan, Derek" <derek_noonan_at_hotmail_dot_com> wrote in message
news:%23NA6OtWoEHA.3556@TK2MSFTNGP10.phx.gbl...[color=blue]
> Hi all,
>
> I'm reposting this, as I feel that it may have got buried. If anyone can
> help me then I'd really appreciate it...
>
> I am trying to read information from the GAL using C#. I am able to return
> a
> list of all the addresses and names, however, when I walk through each
> address I cannot access the mailbox (I keep getting prompted for
> authentication information). Given that the long-term goal here is that
> the
> application run unattended as a service this is obviously not desirable...
>
> My environment consists of the following:
> CDO 1.21
> Exchange 2003
> Outlook 2003
> VS .NET 2003
>
> The application (which uses CDO by the way) first of all goes to the
> Exchange server and builds up a string array of all the users in the GAL.
> Having got these addresses it then attempts to login to each individual
> mailbox and extract the email addresses in the Contacts folder individual
> mailbox which it writes out to a text file.
>
> If you're thinking that this all sounds a bit nefarious then I wouldn't
> blame you but let me assure that it isn't. The generated text file is one
> of
> the criteria that the incoming mail filter uses to decide whether a mail
> message should be rejected or left through - simple as that.
>
> I chose CDO for two reasons, one was that I wanted to provide some
> independence from different Outlook versions and secondly I wanted to
> bypass
> the annoying dialogs that have become a "feature" of Outlook in recent
> versions. However I am experiencing some issues which I am hoping that
> someone may be able to help me with...
>
> 1. The Outlook security dialog is still coming up! This was one of the
> reasons behind not using Outlook day one and instead using CDO. The line
> that causes the dialog to come up is:
>
> aeAddressEntry = (MAPI.AddressEntry)aesAdressEntries.get_Item(i);
>
> where:
> aeAddressEntry is a MAPI.AddressEntry
> aesAdressEntries is a MAPI.AddressEntries collection
> i is merely a loop counter
>
> 2. I am being prompted for a login for each mailbox, despite the fact that
> the ID that the process is running under has Admin privileges - why is
> this?
> I try to type acceptable credentials into it but the dialog keeps coming
> up
> again. WhenI eventually cancel it the error that comes back is
> MAPI_E_FAILONEPROVIDER.
>
> 3. According to the MSKB (cannot remember the KB#) use of CDO through C#
> is
> not supported - if this is indeed the case what am I better off using?
>
> Any help and pointers welcome - much thanks!
>
> ATB,
> Derek
>
> "It's all fun and games till someone loses an eye..."
> Derek Noonan, Technical Director, ntech.ie
>[/color]