By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,353 Members | 1,277 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,353 IT Pros & Developers. It's quick & easy.

Testing for an Invalid Exchange Server (CDO 1.21 & VB.NET)

P: n/a
Hello all,

I have a service that's using CDO 1.21 and Redemption to routinely
iterate through a list of users to retrieve some properties which are
then written to a database.

My problem is that the ExchangeServer property of my service is
user-configured and I wanted to have it write to the event log if this
value is invalid so that it stops trying to process the users
(sometimes in the thousands). Currently, my service is not able to
determine the difference between an invalid user (or a user that
doesn't have a mailbox) and an invalid Exchange Server. I'd like to be
able to Catch both.

The following is my Logon line of code, which generates no error:

_Session.Logon(Nothing, Nothing, False, False, Nothing, True,
ExchangeServer & vbLf & LegacyExchangeDN)

The line of code immediately following it does generate an error:
(MAPI_LOGON_FAILED) -2147221231

_Inbox = _Session.Inbox

I was curious if anyone has a suggestion to determine if the
ExchangeServer value provided is valid short of using DirectoryServices
& CDOEXM to connect to it and retrieve properties.

Mar 8 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.