SCOM Connector Fails with "Mixed Mode Assembly" Error on Windows Server 2019Issue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } .kb-wrapper { font-family: Lato, sans-serif; font-size: 12pt; line-height: 1.7; color: #000000; max-width: 100%; } .kb-wrapper p { margin: 8px 0; } .kb-wrapper code { font-family: 'Courier New', Courier, monospace; font-size: 10.5pt; background-color: #e6f0f5; color: #032D42; border: 1px solid #b8cfd8; border-radius: 3px; padding: 1px 5px; } An SCOM Connector Instance for Event Management fails to run when the MID Server is installed on a Windows Server 2019 host, producing a mixed mode assembly error. Symptoms<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } .kb-wrapper { font-family: Lato, sans-serif; font-size: 12pt; line-height: 1.7; color: #000000; max-width: 100%; } .kb-wrapper p { margin: 8px 0; } .kb-wrapper ul { margin: 8px 0 8px 24px; padding: 0; } .kb-wrapper li { margin-bottom: 4px; } .kb-wrapper pre { background-color: #e6f0f5; color: #032D42; border: 1px solid #b8cfd8; border-radius: 4px; padding: 12px 14px; overflow-x: auto; font-family: 'Courier New', Courier, monospace; font-size: 10.5pt; line-height: 1.5; margin: 12px 0; white-space: pre-wrap; word-break: break-word; } The MID Server is installed on a Windows Server 2019 host.An SCOM Connector Instance is configured in the Event Management plugin.The SCOM Connector fails with the following error: Error running SCOM client: Unhandled Exception: System.IO.FileLoadException: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information. SCOM connector failed. Facts<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } .kb-wrapper { font-family: Lato, sans-serif; font-size: 12pt; line-height: 1.7; color: #000000; max-width: 100%; } .kb-wrapper p { margin: 8px 0; } .kb-wrapper ul { margin: 8px 0 8px 24px; padding: 0; } .kb-wrapper li { margin-bottom: 4px; } .kb-wrapper code { font-family: 'Courier New', Courier, monospace; font-size: 10.5pt; background-color: #e6f0f5; color: #032D42; border: 1px solid #b8cfd8; border-radius: 3px; padding: 1px 5px; } The SCOM client executables and their .config files are shipped with the MID Server package and are located in the \agent\bin\sw_wmi\bin\scom2007 and \agent\bin\sw_wmi\bin\scom2012 directories.The affected config files are: \agent\bin\sw_wmi\bin\scom2007\SCOMClient2007.exe.config\agent\bin\sw_wmi\bin\scom2012\SCOMClient2012.exe.config Both files are identical in content. Neither includes the useLegacyV2RuntimeActivationPolicy="true" attribute required to run mixed mode assemblies under .NET Framework 4.0.This issue occurs on any ServiceNow release when the MID Server is hosted on Windows Server 2019. Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } All Releases Cause<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } .kb-wrapper { font-family: Lato, sans-serif; font-size: 12pt; line-height: 1.7; color: #000000; max-width: 100%; } .kb-wrapper p { margin: 8px 0; } .kb-wrapper code { font-family: 'Courier New', Courier, monospace; font-size: 10.5pt; background-color: #e6f0f5; color: #032D42; border: 1px solid #b8cfd8; border-radius: 3px; padding: 1px 5px; } The SCOM client .config files shipped with the MID Server do not include the useLegacyV2RuntimeActivationPolicy="true" attribute on the <startup> element. Without this attribute, .NET Framework 4.0 cannot load mixed mode assemblies compiled against the v2.0.50727 runtime, causing the SCOM Connector to fail on Windows Server 2019. Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } .kb-wrapper { font-family: Lato, sans-serif; font-size: 12pt; line-height: 1.7; color: #000000; max-width: 100%; } .kb-wrapper p { margin: 8px 0; } .kb-wrapper ul { margin: 8px 0 8px 24px; padding: 0; } .kb-wrapper li { margin-bottom: 4px; } .kb-wrapper code { font-family: 'Courier New', Courier, monospace; font-size: 10.5pt; background-color: #e6f0f5; color: #032D42; border: 1px solid #b8cfd8; border-radius: 3px; padding: 1px 5px; } .kb-wrapper pre { background-color: #e6f0f5; color: #032D42; border: 1px solid #b8cfd8; border-radius: 4px; padding: 12px 14px; overflow-x: auto; font-family: 'Courier New', Courier, monospace; font-size: 10.5pt; line-height: 1.5; margin: 12px 0; white-space: pre-wrap; word-break: break-word; } .kb-wrapper .steps-list { list-style: none; counter-reset: step-counter; margin-left: 0; padding: 0; } .kb-wrapper .steps-list > li { counter-increment: step-counter; display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; } .kb-wrapper .steps-list > li::before { content: counter(step-counter); display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; border-radius: 50%; background-color: #032D42; color: #63DF4E; font-weight: 900; font-size: 11pt; flex-shrink: 0; margin-top: 2px; } .kb-wrapper .steps-list .step-content { flex: 1; } .kb-wrapper .steps-list .step-content ul { margin: 6px 0 0 20px; list-style: disc; } .kb-wrapper .steps-list .step-content ul li { display: list-item; margin-bottom: 3px; } .kb-wrapper .steps-list .step-content ul li::before { display: none; } Add the useLegacyV2RuntimeActivationPolicy="true" attribute to the <startup> element in both SCOM client config files, then restart the MID Server service. On the Windows Server 2019 host, navigate to the MID Server install directory and open the following two files in a text editor: \agent\bin\sw_wmi\bin\scom2007\SCOMClient2007.exe.config\agent\bin\sw_wmi\bin\scom2012\SCOMClient2012.exe.config In both files, locate line 3 and replace <startup> with <startup useLegacyV2RuntimeActivationPolicy="true">.The file should read as follows after the change: <?xml version="1.0" encoding="utf-8" ?> <configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0"/> <supportedRuntime version="v2.0.50727"/> </startup> </configuration> Save both files. Restart the MID Server service on the Windows host. In your ServiceNow instance, open the SCOM Connector Instance record and select Test Connector. The connector should complete successfully and SCOM events should begin populating the Event [em_event] table. Related Links<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } .kb-wrapper { font-family: Lato, sans-serif; font-size: 12pt; line-height: 1.7; color: #000000; max-width: 100%; } .kb-wrapper p { margin: 8px 0; } .kb-wrapper .related-links a { color: #032D42; text-decoration: underline; } .kb-wrapper .link-disclaimer { font-size: 10pt; font-style: italic; margin: 2px 0 10px 0; color: #444; } SCOM Connector — ServiceNow Documentation