Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using EWS for a C# client that subscribes to new mail notification. We currently have what I believe are 4 client access servers in our environment. If I use autodiscover to find the correct CAS I often get what appears to be the wrong one. I know when it picks the wrong one because if I send myself an email (which should trigger a new mail notification) my client is never notified. I am able to get notifications working for a while (time is undetermined) if I hard code which CAS (this is a guessing game on my part) I wish to connect to, however that stops working when the mailbox moves client access servers. I'm using InternalEwsUrl. This is a fully patched Exchange 2010 SP1 server.

Looking at the stack trace I see that it correctly finds all 4 client access servers with a priority of 1. It always picks the top most CAS (assuming this is default behavior), which is more often than not incorrect.

Any idea as to why I'm not always resolving the proper CAS?

Note: I'm a developer and not a system administrator so if I said something that doesn't make sense or requires clarification, please tell.

share|improve this question
1  
I'm confused as to why you think you're getting an incorrect CAS. If you have 4 CAS server, I would think that you have separate Mailbox servers. Is that the case? –  Tatas May 24 '11 at 17:28
    
Correct. I'm only assuming to be getting an incorrect CAS because I'll subscribe for new mail notification (similar to push/pull subscriptions) and won't receive notifications when supposed to. –  Mike May 24 '11 at 17:34
1  
Assuming this is a single site we're talking about, any CAS server should suffice. As they should have the ability to talk to any mailbox server in your org. Sounds like there is something deeper going on. What version of Exchange? Are you fully patched? –  Tatas May 24 '11 at 17:36
2  
I don't know if this will help, but have you tried pointing at a CAS array instead of a single CAS server? I assume if there's 4 CAS servers there will be a CAS array (ask the admins for the FQDN of it, they should know). FYI, clients move between CAS servers, not mailboxes. The CAS server acts as a go-between for the client and the mailbox. –  Ben Pilbrow May 24 '11 at 17:55
2  
Agreed. Try using the FQDN of the CAS array. –  Tatas May 24 '11 at 18:01

1 Answer 1

In Exchange Management Shell, type

Get-ExchangeServer
Get-Mailbox [user] | fl Database

This will tell you how many Exchange servers you have, what roles are installed, and what site they belong to. The second command will tell you what database you're on. Autodiscover will find any CAS in your mailbox server's Active Directory site (the CAS you connect to has to be in the same site). There are a few things you need to check.

  1. The SCP is correct for every CAS. If it is the only CAS in that site, it should point to itself, otherwise it should be the load balancer name (VIP).
    Get-ClientAccessServer | fl AutoDiscoverServiceInternalUri

  2. RPCClientAccessServer for each database within the site should point to the aforementioned CAS/Array. Get-MailboxDatabase | fl Server,Database,RPC*

  3. The internal URL for EWS for every CAS in the site should also point to the same CAS/Array. Also verify that the settings on the EWS virtual directory is the same for each server. Since any CAS in the site can serve your request, EWS may just be mis-configured for a particular server.
    Get-WebServicesVirtualDirectory | fl Identity,*auth*,*URL

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.