The Problem

Scenario 1: Both web addresses work, ECP logs in but OWA gives the “Something went wrong” page after submitting credentials.
Scenario 2: Both web addresses work, OWA Logs in but ECP gives the “Something went wrong” page after submitting credentials.
Scenario 3: Both web addresses work but both give “Something went wrong” page after submitting credentials.
The Cause:
This issue is generally caused by interruption or failure of the Exchange Server 2016 (“Could not grant permissions to Discovery Management” ring any bells?) – the issue is caused as the SharedWebConfig is not copied from the originating bin folder and placed in all of the relevant locations for ECP/OWA to function.
You can confirm if this is the case by checking if the file is missing in:
OWA – C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess
ECP – C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy
The Resolution
The issue can be resolved with a simple bit of command line. For simplicity, I will refer to your exchange installation directory as {ExchangeDirectory} – this is C:\Program Files\Microsoft\Exchange Server\v15\ or wherever you specified in installation
- Launch Exchange Management Shell
- cd to {ExchangeDirectoy}/bin
- Run the following command(s) depending on your issue:
OWA – DependentAssemblyGenerator.exe -exchangePath “{ExchangeDirectory}\bin” -exchangePath “{Exchange Directory}\ClientAccess” -configFile “{Exchange Directory}\ClientAccess\SharedWebConfig.config”
ECP – DependentAssemblyGenerator.exe -exchangePath “{ExchangeDirectory}\bin” -exchangePath “{Exchange Directory}\FrontEnd\HttpProxy” -configFile “{Exchange Directory}\FrontEnd\\HttpProxy\SharedWebConfig.config” - Wait for execution to complete.
- Ensure the file has copied

- run iisreset /noforce or restart the server.
- You (should) now have a working ECP/OWA
