Classic ASP app running from Container. Could read data from SQL server, not able to upload

I have a Classic ASP application running from Container. It connects to DB server and could read data from SQL server, but could not upload .csv data to tables. Can perform same functionality from local IIS sever without issue.

Both Local server and container is Windows Server 2019.

Dockerfile:

escape=`

FROM mcr.microsoft.com/windows/servercore/iis:20200811-windowsservercore-ltsc2019

SHELL ["powershell", "-command"]

RUN powershell -Command Add-WindowsFeature Web-Server;

RUN Install-WindowsFeature Web-ASP; Install-WindowsFeature Web-CGI;
Install-WindowsFeature Web-ISAPI-Ext; Install-WindowsFeature Web-ISAPI-Filter;
Install-WindowsFeature Web-Includes; Install-WindowsFeature Web-HTTP-Errors;
Install-WindowsFeature Web-Common-HTTP; Install-WindowsFeature Web-Performance;
Install-WindowsFeature WAS; `
Import-module IISAdministration;
#Import-Module WebAdministration;

Temporal folder for installations files

RUN md c:/msi;

RUN Invoke-WebRequest ‘https://download.microsoft.com/download/1/E/7/1E7B1181-3974-4B29-9A47-CC857B271AA2/English/X64/msodbcsql.msi’ -Proxy http://proxy.aurora.lab.ad.elabs.svcs.entsvcs.net:8088 -OutFile c:/msi/msodbcsql.msi;

RUN ["cmd", "/S", "/C", "c:windowssyswow64msiexec", "/i", "c:msimsodbcsql.msi", "IACCEPTMSODBCSQLLICENSETERMS=YES", "ADDLOCAL=ALL", "/qn"];

RUN Add-OdbcDsn -Name "myapp" -DriverName ""SQL Server"" -Platform "32-bit" -DsnType "System" -SetPropertyValue @(""Server=172.28.108.232BSS_Test,1433;Database=myapp;UserId=app_web;Password=$Rpa55w0rd;"");

EXPOSE 8095
RUN Remove-Website -Name ‘Default Web Site’; md c:BSS-Snow;
New-IISSite -Name "myapp" -PhysicalPath 'c:myapp'
-BindingInformation "*:8095:";

RUN & c:windowssystem32inetsrvappcmd.exe unlock config
/section:system.webServer/asp

RUN & c:windowssystem32inetsrvappcmd.exe unlock config
/section:system.webServer/handlers

RUN & c:windowssystem32inetsrvappcmd.exe unlock config
/section:system.webServer/modules

ADD . c:myapp

Source: Windows Questions

LEAVE A COMMENT