Fix Microsoft Exchange 2016/2019 ECP Error

In the past we have encountered many ECP errors especially after updating the .NET Framework on Microsoft Exchange 2016/2019 Servers

You might get an error with “Could not load file or assembly ‘Microsoft.Exchange.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified.”

What we normally did was to update/re-install the exchange server with the latest CU. This is however is not always possible. After many hours of exploring multiple fixes this seems to work best.

Open IIS Manager. Expand Sites > Exchange Back End.
Select the ecp Application. Open Application Settings in /ecp Home.

Please check whether the value for “BinSearchFolders” is changed to an invalid value or %ExchangeInstallDir%. If so, please change it to:


C:\Program Files\Microsoft\Exchange Server\V15\bin;C:\Program Files\Microsoft\Exchange Server\V15\bin\CmdletExtensionAgents;C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Owa\bin

Next we need to verify the web.config file for the OWA and ECP Applications

Open the Web.config file for OWA in the default path C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Owa. If there is any %ExchangeInstallDir% in the web.config content, replace all of them with C:\Program Files\Microsoft\Exchange Server\V15\

Now do the same for the ECP application

Check the web.config file for ECP in Exchange back end and confirm if there is any %ExchangeInstallDir% in the web.config content. The default location for the ECP application is C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp. If that is the case, please replace all of %ExchangeInstallPath% with c:\programfiles\Microsoft\Exchange Server\V15\Bin

Lastly we need to run the following as an Administrator under Command or PowerShell

Run IISReset command to restart IIS services.

If this does solve the issue we need to run a script to copy the content back and repair some of the files in IIS

Open Exchange PowerShell as an Administrator
Change the directory to C:\Program Files\Microsoft\Exchange Server\V15\Bin
Now run .\UpdateCas.ps1

Lastly run the IISreset again

Run IISReset command to restart IIS services.

This seems to fix most of our ECP issues.

Exchange


Recent Posts

Latest Tweets