Once you installed Exchange 2016 Cumulative Update 5 you might find out that the server is half broken now:
– Powershell isn´t working
– OWA & ECP isn´t working
– Users see connection issues
Additional you see the following errors when you start a powershell on the affected Server:
New-PSSession : [exch01.int.contoso.com] Connecting to remote server exch01.int.contoso.com failed with the following error message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from the destination computer. The content type is absent or invalid. For more information, see the about_Remote_Troubleshooting Help topic. At line:1 char:1 + New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException + FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed
When you try to open any Exchange Website (e.g ECP, OWA, …) on localhost:
Server Error in '/ecp' Application. Could not load type 'Microsoft.Exchange.VariantConfiguration.MachineSettingsContext' from assembly 'Microsoft.Exchange.VariantConfiguration.Core, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.TypeLoadException: Could not load type 'Microsoft.Exchange.VariantConfiguration.MachineSettingsContext' from assembly 'Microsoft.Exchange.VariantConfiguration.Core, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [TypeLoadException: Could not load type 'Microsoft.Exchange.VariantConfiguration.MachineSettingsContext' from assembly 'Microsoft.Exchange.VariantConfiguration.Core, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.] Microsoft.Exchange.HttpProxy.HttpProxySettings..cctor() +0 [TypeInitializationException: The type initializer for 'Microsoft.Exchange.HttpProxy.HttpProxySettings' threw an exception.] Microsoft.Exchange.HttpProxy.ProxyApplication.ConfigureServicePointManager() +25 Microsoft.Exchange.HttpProxy.ProxyApplication.<Application_Start>b__0() +101 Microsoft.Exchange.Common.IL.ILUtil.DoTryFilterCatch(Action tryDelegate, Func`2 filterDelegate, Action`1 catchDelegate) +33 Microsoft.Exchange.HttpProxy.ProxyApplication.Application_Start(Object sender, EventArgs e) +268 [HttpException (0x80004005): The type initializer for 'Microsoft.Exchange.HttpProxy.HttpProxySettings' threw an exception.] System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +540 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +186 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +402 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +343 [HttpException (0x80004005): The type initializer for 'Microsoft.Exchange.HttpProxy.HttpProxySettings' threw an exception.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +539 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +125 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +731
You see also multiple errors in the eventlog which outlined as below:
Log Name: Application
Source: MSExchange Front End HTTP Proxy
Date: 2017-05-03 12:09:43
Event ID: 1003
Task Category: Core
Level: Error
Keywords: Classic
User: N/A
Computer: exch01.int.contoso.com
Description:
[Ews] An internal server error occurred. The unhandled exception was: System.TypeInitializationException: The type initializer for 'Microsoft.Exchange.HttpProxy.HttpProxySettings' threw an exception. ---> System.TypeLoadException: Could not load type 'Microsoft.Exchange.VariantConfiguration.MachineSettingsContext' from assembly 'Microsoft.Exchange.VariantConfiguration.Core, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
at Microsoft.Exchange.HttpProxy.HttpProxySettings..cctor()
--- End of inner exception stack trace ---
at Microsoft.Exchange.HttpProxy.ProxyApplication.ConfigureServicePointManager()
at Microsoft.Exchange.HttpProxy.ProxyApplication.<Application_Start>b__0()
at Microsoft.Exchange.Common.IL.ILUtil.DoTryFilterCatch(Action tryDelegate, Func`2 filterDelegate, Action`1 catchDelegate)
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="MSExchange Front End HTTP Proxy" />
<EventID Qualifiers="49152">1003</EventID>
<Level>2</Level>
<Task>1</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2017-05-03T10:09:43.000000000Z" />
<EventRecordID>11496805</EventRecordID>
<Channel>Application</Channel>
<Computer>exch01.int.contoso.com</Computer>
<Security />
</System>
<EventData>
<Data>Ews</Data>
<Data>System.TypeInitializationException: The type initializer for 'Microsoft.Exchange.HttpProxy.HttpProxySettings' threw an exception. ---> System.TypeLoadException: Could not load type 'Microsoft.Exchange.VariantConfiguration.MachineSettingsContext' from assembly 'Microsoft.Exchange.VariantConfiguration.Core, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
at Microsoft.Exchange.HttpProxy.HttpProxySettings..cctor()
--- End of inner exception stack trace ---
at Microsoft.Exchange.HttpProxy.ProxyApplication.ConfigureServicePointManager()
at Microsoft.Exchange.HttpProxy.ProxyApplication.<Application_Start>b__0()
at Microsoft.Exchange.Common.IL.ILUtil.DoTryFilterCatch(Action tryDelegate, Func`2 filterDelegate, Action`1 catchDelegate)</Data>
</EventData>
</Event>
Log Name: Application Source: ASP.NET 4.0.30319.0 Date: 2017-05-03 12:09:43 Event ID: 1309 Task Category: Web Event Level: Warning Keywords: Classic User: N/A Computer: exch01.int.contoso.com Description: Event code: 3005 Event message: An unhandled exception has occurred. Event time: 2017-05-03 12:09:43 Event time (UTC): 2017-05-03 10:09:43 Event ID: 4bd0116e1265459da6aca71545a8690e Event sequence: 2 Event occurrence: 1 Event detail code: 0 Application information: Application domain: /LM/W3SVC/1/ROOT/EWS-3-131382797788920399 Trust level: Full Application Virtual Path: /EWS Application Path: C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\EWS\ Machine name: DEFFMEXCH01 Process information: Process ID: 304 Process name: w3wp.exe Account name: NT AUTHORITY\SYSTEM Exception information: Exception type: HttpException Exception message: The type initializer for 'Microsoft.Exchange.HttpProxy.HttpProxySettings' threw an exception. at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) The type initializer for 'Microsoft.Exchange.HttpProxy.HttpProxySettings' threw an exception. at Microsoft.Exchange.HttpProxy.ProxyApplication.ConfigureServicePointManager() at Microsoft.Exchange.HttpProxy.ProxyApplication.<Application_Start>b__0() at Microsoft.Exchange.Common.IL.ILUtil.DoTryFilterCatch(Action tryDelegate, Func`2 filterDelegate, Action`1 catchDelegate) at Microsoft.Exchange.HttpProxy.ProxyApplication.Application_Start(Object sender, EventArgs e) Could not load type 'Microsoft.Exchange.VariantConfiguration.MachineSettingsContext' from assembly 'Microsoft.Exchange.VariantConfiguration.Core, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. at Microsoft.Exchange.HttpProxy.HttpProxySettings..cctor() Request information: Request URL: https://localhost:443/ews/ Request path: /ews/ User host address: ::1 User: Is authenticated: False Authentication Type: Thread account name: NT AUTHORITY\SYSTEM Thread information: Thread ID: 59 Thread account name: NT AUTHORITY\SYSTEM Is impersonating: False Stack trace: at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) Custom event details: Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="ASP.NET 4.0.30319.0" /> <EventID Qualifiers="32768">1309</EventID> <Level>3</Level> <Task>3</Task> <Keywords>0x80000000000000</Keywords> <TimeCreated SystemTime="2017-05-03T10:09:43.000000000Z" /> <EventRecordID>11496807</EventRecordID> <Channel>Application</Channel> <Computer>exch01.int.contoso.com</Computer> <Security /> </System> <EventData> <Data>3005</Data> <Data>An unhandled exception has occurred.</Data> <Data>2017-05-03 12:09:43</Data> <Data>2017-05-03 10:09:43</Data> <Data>4bd0116e1265459da6aca71545a8690e</Data> <Data>2</Data> <Data>1</Data> <Data>0</Data> <Data>/LM/W3SVC/1/ROOT/EWS-3-131382797788920399</Data> <Data>Full</Data> <Data>/EWS</Data> <Data>C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\EWS\</Data> <Data>DEFFMEXCH01</Data> <Data> </Data> <Data>304</Data> <Data>w3wp.exe</Data> <Data>NT AUTHORITY\SYSTEM</Data> <Data>HttpException</Data> <Data>The type initializer for 'Microsoft.Exchange.HttpProxy.HttpProxySettings' threw an exception. at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) The type initializer for 'Microsoft.Exchange.HttpProxy.HttpProxySettings' threw an exception. at Microsoft.Exchange.HttpProxy.ProxyApplication.ConfigureServicePointManager() at Microsoft.Exchange.HttpProxy.ProxyApplication.<Application_Start>b__0() at Microsoft.Exchange.Common.IL.ILUtil.DoTryFilterCatch(Action tryDelegate, Func`2 filterDelegate, Action`1 catchDelegate) at Microsoft.Exchange.HttpProxy.ProxyApplication.Application_Start(Object sender, EventArgs e) Could not load type 'Microsoft.Exchange.VariantConfiguration.MachineSettingsContext' from assembly 'Microsoft.Exchange.VariantConfiguration.Core, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. at Microsoft.Exchange.HttpProxy.HttpProxySettings..cctor() </Data> <Data>https://localhost:443/ews/</Data> <Data>/ews/</Data> <Data>::1</Data> <Data> </Data> <Data>False</Data> <Data> </Data> <Data>NT AUTHORITY\SYSTEM</Data> <Data>59</Data> <Data>NT AUTHORITY\SYSTEM</Data> <Data>False</Data> <Data> at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) </Data> </EventData> </Event>
Log Name: Application Source: MSExchange Front End HTTP Proxy Date: 2017-05-03 12:09:43 Event ID: 1003 Task Category: Core Level: Error Keywords: Classic User: N/A Computer: exch01.int.contoso.com Description: [Ews] An internal server error occurred. The unhandled exception was: System.TypeInitializationException: The type initializer for 'Microsoft.Exchange.HttpProxy.HttpProxySettings' threw an exception. ---> System.TypeLoadException: Could not load type 'Microsoft.Exchange.VariantConfiguration.MachineSettingsContext' from assembly 'Microsoft.Exchange.VariantConfiguration.Core, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. at Microsoft.Exchange.HttpProxy.HttpProxySettings..cctor() --- End of inner exception stack trace --- at Microsoft.Exchange.HttpProxy.ProxyApplication.ConfigureServicePointManager() at Microsoft.Exchange.HttpProxy.ProxyApplication.<Application_Start>b__0() at Microsoft.Exchange.Common.IL.ILUtil.DoTryFilterCatch(Action tryDelegate, Func`2 filterDelegate, Action`1 catchDelegate) Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="MSExchange Front End HTTP Proxy" /> <EventID Qualifiers="49152">1003</EventID> <Level>2</Level> <Task>1</Task> <Keywords>0x80000000000000</Keywords> <TimeCreated SystemTime="2017-05-03T10:09:43.000000000Z" /> <EventRecordID>11496805</EventRecordID> <Channel>Application</Channel> <Computer>exch01.int.contoso.com</Computer> <Security /> </System> <EventData> <Data>Ews</Data> <Data>System.TypeInitializationException: The type initializer for 'Microsoft.Exchange.HttpProxy.HttpProxySettings' threw an exception. ---> System.TypeLoadException: Could not load type 'Microsoft.Exchange.VariantConfiguration.MachineSettingsContext' from assembly 'Microsoft.Exchange.VariantConfiguration.Core, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. at Microsoft.Exchange.HttpProxy.HttpProxySettings..cctor() --- End of inner exception stack trace --- at Microsoft.Exchange.HttpProxy.ProxyApplication.ConfigureServicePointManager() at Microsoft.Exchange.HttpProxy.ProxyApplication.<Application_Start>b__0() at Microsoft.Exchange.Common.IL.ILUtil.DoTryFilterCatch(Action tryDelegate, Func`2 filterDelegate, Action`1 catchDelegate)</Data> </EventData> </Event>
You already tried:
– Make sure the server is up to date with all Microsoft OS updates
– Rebooted it several times
– Disabled Antivirus & local OS firewall
Solution:
A solution which was working for me was the following:
1a.) On the affected Exchange 2016 CU5 server got to C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy and rename the file SharedWebConfig.config to SharedWebConfig.config_OLD
1b.) Copy the SharedWebConfig.config from a Exchange 2016 CU5 server which do not have the issues to that folder on the affected Server
2a.) On the affected Exchange 2016 CU5 server got to C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess and rename the file SharedWebConfig.config to SharedWebConfig.config_OLD
2b.) Copy the SharedWebConfig.config from a Exchange 2016 CU5 server which do not have the issues to that folder on the affected Server
3.) Start a CMD (run as admin) and perform an iis reset (on the affected Server) via:
iisreset
Root cause:
The root cause from that issue seamed to be that there exists a Setup folder inside C:\Program Files\Microsoft\Exchange Server\V15\bin\. This is sometimes done to cover an error 1619, for a better solution for the error 1619 see here.