Docker Community Forums

Share and learn in the Docker community.

Is it possible to create a Docker Windows with ASP Classic and VB6 DLL on Complus


(Msrocha) #1

I’m trying to create a container with an ASP classic using VB6 DLL at Complus.
The idea is to migrate one legacy ASP+ComPlus system to docker.

There is any way to create this?

My docker file:

FROM microsoft/dotnet-framework:3.5
SHELL [“powershell”]
RUN Install-WindowsFeature Web-Asp-Net ;
Install-WindowsFeature Web-Server ;
Install-WindowsFeature Web-WebServer ;
Install-WindowsFeature Web-Common-Http ;
Install-WindowsFeature Web-Default-Doc ;
Install-WindowsFeature Web-Dir-Browsing ;
Install-WindowsFeature Web-Http-Errors ;
Install-WindowsFeature Web-Static-Content;
Install-WindowsFeature Web-Health ;
Install-WindowsFeature Web-Http-Logging ;
Install-WindowsFeature Web-Log-Libraries ;
Install-WindowsFeature Web-ODBC-Logging ;
Install-WindowsFeature Web-Http-Tracing;
Install-WindowsFeature Web-Performance ;
Install-WindowsFeature Web-Stat-Compression ;
Install-WindowsFeature Web-Security ;
Install-WindowsFeature Web-Filtering ;
Install-WindowsFeature Web-Basic-Auth ;
Install-WindowsFeature Web-Windows-Auth ;
Install-WindowsFeature Web-App-Dev ;
Install-WindowsFeature Web-Net-Ext ;
Install-WindowsFeature Web-Net-Ext45 ;
Install-WindowsFeature Web-ASP ;
Install-WindowsFeature Web-ISAPI-Ext ;
Install-WindowsFeature Web-Mgmt-Tools ;
Install-WindowsFeature Web-Mgmt-Compat ;
Install-WindowsFeature Web-Metabase ;
Install-WindowsFeature Web-Lgcy-Scripting ;
Install-WindowsFeature Web-WMI ;
Install-WindowsFeature Web-Scripting-Tools;
mkdir c:\Avanade\ComPlus;
Remove-Item -Recurse C:\inetpub\wwwroot*;

WORKDIR /inetpub/wwwroot

COPY content/wwwroot .

WORKDIR /Comp/ComPlus

COPY content/DLLs .
COPY Create-ComPlus-Application.ps1 .

RUN .\Create-ComPlus-Application.ps1

Create-ComPlus-Application.ps1:
$ApplicationUser = “AdminUser”;
$UserPassword = “@PwdAdmin”;

New-LocalUser $ApplicationUser -Password (ConvertTo-SecureString -AsPlainText $UserPassword -Force) -FullName “Legacy COM Plus” -Description “Local Administrator”;

$comAdmin = New-Object -comobject COMAdmin.COMAdminCatalog;
$apps = $comAdmin.GetCollection(“Applications”);
$apps.Populate();

$newComPackageName = “DockerComplus”;

$appExistCheckApp = $apps | Where-Object {$_.Name -eq $newComPackageName};

If($appExistCheckApp)
{
$appExistCheckAppName = $appExistCheckApp.Value(“Name”);
“This COM+ Application already exists : $appExistCheckAppName” ;
}
Else
{

$newApp1 = $apps.Add();
$newApp1.Value(“Name”) = $newComPackageName;
$newApp1.Value(“ApplicationAccessChecksEnabled”) = 0; # Security Tab, Authorization Panel, "Enforce access checks for this application
$newApp1.Value(“ApplicationAccessChecksEnabled”) = $false;
#$newApp1.Value(“Identity”) = “nt authority\localservice”;

$newApp1.Value(“Identity”) = $ApplicationUser
$newApp1.Value(“Password”) = $UserPassword

$saveChangesResult = $apps.SaveChanges();
“Results of the SaveChanges operation : $saveChangesResult”;
};

$comAdmin.InstallComponent($newComPackageName, “c:\AspTut\AspTut.dll”, $null, $null);

The last line I received a error:
Errors occurred accessing one or more objects - the ErrorInfo collection may have more detail (Exception from HRESULT:
0x80110401)
At line:1 char:1

  • $comAdmin.InstallComponent($newComPackageName, "c:\Avanade\AspTut\Asp …
  •   + CategoryInfo          : OperationStopped: (:) [], COMException
      + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException