A timeout ocurred after 30000 selecting a server using CompositeServerSelector

I am trying to connect to MongoDB using C#/.Net to Outsystems. I was able to connect successfully in DEV environment, but when it was deployed to TEST environment, it has a problem connecting with the server. IP address has been whitelisted as well but it still has the same issue.

The difference between the setup of DEV and TEST is that they added the name of MongoDB server and the IP address in the host table of the front-end dev server while on the TEST environment it was not implemented due to tech issues or sec issues.

We are also using the IP address as the server name.
We also use the standalone format of connection string.

Is there any alternative solution for this?