tags:

views:

33

answers:

1

We are attempting to connect to an Exchange server through CFEXCHANGECONNECTION on ColdFusion 9 to retrieve email.

We can connect with a number of users. However, some users cannot connect. We end up with the following error:

Cannot access Exchange server as a web application at <server>

It turns out that the users who cannot connect either have a ampersand in there username or they have changed there username with CFLDAP.

So, if I perform a CFLDAP on a working user and change the userPrincipalName and sAMAccountName the user will begin getting the error above.

If I change it back to what it was to start with, the error will go away.

Any ideas?

EDIT

The ampersand part seems to be misleading. Essentially we found the problem because of the ampersand. However, for working users who did not have an ampersand, the error will begins showing up if their username is changed to something that does not have an ampersand.

+1  A: 

It turns out that the problem was that I was not properly updating the mailNickname and proxyAddress.

Because of this, exchange was not able to properly resolve the desired mailbox name.

So by setting those variables we were able to fix the problem.

As an added fail-safe I added the mailboxname parameter to the cfexchangeconnection and set it to the email address that we were looking for.

Tom Hubbard