EWS: How to bypass the load balancer on Exchange

exchangeload balancing

I have an application that uses the EWS 2.0 Managed API to connect to Exchange. It works for one setup (single Exchange server) but isn't able to connect to another load-balanced setup.

For the developers, this is the error I'm getting:

Microsoft.Exchange.WebServices.Data.ServiceRequestException:
The response received from the service didn't contain valid XML.

Online reports lead me to believe that I need to bypass the load-balancer. [1]

How do I do that? I know about a setting called "internalNLBBypassURL", but am not sure exactly what this should be set to. Will it be set to the FQDN of the service (load balancer), or the Exchange server? Do I then put the value of internalNLBBypassURL into my application when connecting? Will this be sufficient, or are there other steps I should check?

[1] http://social.technet.microsoft.com/Forums/exchange/en-US/54432b2a-1c5f-4cdc-be33-57fafae2df78/accessing-exchange-2010-sp2-via-ews-20-results-in

Best Answer

For posterity:

Yes, I just needed to get the Exchange admin to run the CmdLet

get-webservicesvirtualdirectory | fl *url

on the Exchange Management Shell, which gave me the values for InternalURL, ExternalURL and InternalNLBBypassUrl. The last two have to be the same. I set my application to connect to InternalNLBBypassUrl and it worked.