C# .NET 9 application in docker cannot connect to mongo DB instance
I want to execute a console program (.NET application) in a Docker container. It contains a mongo client and functions OK when used as a stand-alone program, however I keep receiving timeout errors when I try to make a docker container. I even verified that the connection from the Docker container functions by using the exact same connection string for MongoDB. There is a problem with the program that was made for Docker (I use AOT, but it should not be an issue because it works the same way for standalone).