Exception has been thrown by the target of an invocation.. in Docker conainer with .Net4 app
I have 2 virtual machines (VMWare) with Linux Mint and Windows. Docker container with .Net5 app is in Mint and does not connect to Oracle19 database on Windows machine. Oracle.ManagedDataAccess.Client
is used to connect the DB. The following error occurs on connection.Open()
.
Exception has been thrown by the target of an invocation.. from System.Private.CorLib
.
Dockerfile
FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim
WORKDIR /App
RUN .................
COPY . /App
ENV .................
ENTRYPOINT ["dotnet", "App.dll"]
Linux terminal
docker run ........... -p 1521:1521 id
Source: Docker Questions