Exchange 2010 - Users connecting to CAS server in a different site

Here is the scenario. We have our primary site with 2 servers running the MB role and 1 server running the CAS / HT role. Everything was fine until we installed two additional mailbox servers and one CAS /HT server at the secondary site. We added the mailbox servers to the DAG and created database copies on the new servers at the secondary site.
Now all of a sudden, several users are connecting to the CAS server at the secondary site and are unable to connect to their mailboxes. After receiving dozens of call from such users, we shutdown the CAS server at the secondary site ad that has somewhat helped and users (after rebooting their machines) are able to connect to outlook. Also, somehow, the some of the mailbox databases got activated on the secondary site servers, when they should not.
Question: how can we prevent users from connecting to the CAS server in the secondary site and 2) why did the databases switchover to the secondary site. If there is an issue with the mailbox server at the primary site, we have another mailbox server with copies of the active database at the primary site with activation preference to become the active server.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

StuartTechnical Architect - CloudCommented:
If your mailbox is located in site 1 you must connect to a cas server in site 1, this could either be direct or by redirect from a cas server in site 2. Are the different sites also setup as separate sites in AD sites and services?

If I was in your position (presuming you have the resources to do so) I would install all the services on all three servers, or 2x multi role and 1x Hub/Cas. Set database activation preferences to always favour local copies. Your current environment has no client access resilience at all. Also ensure you have a CAS array configured in each site (you will have to manually edit the databases rpc settings for this to work)
Amit KumarCommented:
Better you create a client access array and assign it to DB

1. Create a alias record in internal DNS which will point to your CAS server's DNS record. e.g
2. New-ClientAccessArray -Fqdn -Site "ADsiteName" -Name ""

once above steps are done then set this CAS array to your Site A's mailbox DBs.
3. Set-MailboxDatabase "My Mailbox Database" -RpcClientAccessServer

Same way you can create CAS array in site B but dont assign it to DBs if you have only copies in Site B.

Note: You will have to change server name according to your infra marked as bold.

Actually CAS array helps us to identify which site is holding active DB copy and where user is homed. If your user is homed in Site A and you have live exchange in Site B without configuring CAS array then it will happen.

On the other hand don't use same URLs on Site B CAS server while both sites are live.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Antonio02Author Commented:
Thanks guys, appreciate your help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.