I have a very large WinForms application that i would like to deploy via docker.
The application is composed of hundreds of COM dlls that require registration.
The application is also composed of many .NET assemblies on Framework 4.62. Some of which also require COM registration.
The application needs access to remote and/or local file storage as well and SQL server. Assumption is that SQL Server is managed by the host OS as i do not plan to include it in a container.
How do I deploy COM dlls in a Container that need to be registered ?
Please point me to any resources that would be helpful based on the information above.
Windows GUI applications cannot run in containers, as of today. So containerizing your WinForms app may not be worth the effort, especially because it also involves 32-bit COM dlls.
That said, if you were containerizing a non-GUI service type of application, registering 32-bit COM dlls in containers is the same as registering them on regular Windows. Start from the microsoft/windowsservercore image, and use %WINDIR%\syswow64\regsvr32.exe.
COPY your32bitCOM.dll C:\SomeDirectory\your32bitCOM.dll
RUN %WINDIR%\syswow64\regsvr32.exe C:\SomeDirectory\your32bitCOM.dll
Is there any permanent solution for this problem. I have tried most of the solutions found in the internet to register my third party DLLs in the windows registry. But nothing helps.
my current docker file as below.
SHELL [“powershell”, “-command”]
The ongoing issue with third party DLL registration got resolved.
First of all, I had to copy a dll “msvbvm60.dll” to the DLL folder to copy to the containers. So with out this DLL, the other DLLs will not get registered. The “msvbvm60.dll” can be found in c:\windows\syswow64\msvbvm60.dll folder of your local machine.
Another issue was vbrun60sp6.exe need to start before moving the DLLS. vbrun60sp6.exe is another important component for the third party DLLs to get registered.
So the third party registration in the docker file would look like below.
RUN Start-Process c:\dll\vbrun60sp6.exe -Wait; Start-Process c:\Windows\SysWOW64\regsvr32.exe -ArgumentList '/s', "c:\dll\ErrMngr.dll -Wait;
Let me know if this helps anyone.
Now I am facing another issue. To enable windows authentication, we need to configure gMSA. I do not have any idea about the gMSA configuration. From google I am finding that we need to have min win 2012 server to do that. So cant we implement gMSA on local machine? and if possible, what are the steps to do so. Please suggest.
Make sure the command is being run from a 64-bit process (or a 64-bit cmd.exe console window). Otherwise, the %windir%\System32\regsvr32.exe command will be redirected to %windir%\SysWoW64\regsvr32.exe and a 32-bit regsrv32 will be run ttrockstars (which can’t register 64-bit DLLs).
You could also try using %windir%\sysnative\regsvr32.exe which will redirect to the real %windir%\System32\ directory (but only from a 32-bit process, so if you use that take care to make sure no one tries to run the command from a 64-bit process).
I tried using vbrun60sp6.exe as well as copying msvbvm60.dll to both the directory where my com application is located as well as SysWOW64. It had no effect, registration still silently fails.
Trying System32 instead of SysWOW64 didn’t help, either.
Is there any update on this issue? I am trying to register a 32 bit ocx file on a Windows container. Although the command regsvr32 “myfile.ocx” gets executed, it doesnt seem to register. Is there a workaround for this?
Also have the same issue using servercore:ltsc2019. The workaround listed in this topic does not work. The vbrun60sp6.exe process never ends even when ran in quiet mode. Is there any way to do this ? We are trying to convert a legacy desktop application to use in containers. We dumped the UI part and kept only the “services” part but regsvr32.exe /S silently fails.