COM management: Difference between revisions
From OPC Labs Knowledge Base
No edit summary |
(→!!!) |
||
Line 8: | Line 8: | ||
= !!! = | = !!! = | ||
; Console apps in C# : The main method runs on an MTA thread, unless specified otherwise. This is generally good, because it prevents premature COM security initialization. If COM security initialization fails, and there is an [STAThread] on the program's main method, remove it. If it still fails, add a ComManagement.Instance.AssureSecurityInitialization() call to the very beginning of the program's main method. | ; Console apps in C# : The main method runs on an MTA thread, unless specified otherwise. This is generally good, because it prevents premature COM security initialization. If COM security initialization fails, and there is an [STAThread] attribute on the program's main method, remove it. If it still fails, add a ComManagement.Instance.AssureSecurityInitialization() call to the very beginning of the program's main method. | ||
; Console apps in VB.NET : The main method runs on an STA thread, unless specified otherwise. This causes a premature COM security initialization. If there is an <STAThread> attribute on the program's main method, remove it. Then, add an <MTAThread> attribute to the program's main method. If the COM security initialization still fails, add a ComManagement.Instance.AssureSecurityInitialization() call to the very beginning of the program's main method. | |||
= Configuring COM = | = Configuring COM = |
Revision as of 12:35, 15 February 2022
This article applies to QuickOPC 2022.1 and later.
(TBD)
!!!
- Console apps in C#
- The main method runs on an MTA thread, unless specified otherwise. This is generally good, because it prevents premature COM security initialization. If COM security initialization fails, and there is an [STAThread] attribute on the program's main method, remove it. If it still fails, add a ComManagement.Instance.AssureSecurityInitialization() call to the very beginning of the program's main method.
- Console apps in VB.NET
- The main method runs on an STA thread, unless specified otherwise. This causes a premature COM security initialization. If there is an <STAThread> attribute on the program's main method, remove it. Then, add an <MTAThread> attribute to the program's main method. If the COM security initialization still fails, add a ComManagement.Instance.AssureSecurityInitialization() call to the very beginning of the program's main method.
Configuring COM
COM security initialization
Dealing with CVE-2021-26414
!!!
COM settings in OPC Classic client components
KB5004442—Manage changes for Windows DCOM Server Security Feature Bypass (CVE-2021-26414)