@Phillip Hu Thanks for reaching here! If you are Unable to Connect to Azure Cosmos DB for MongoDB vCore - Timeout error
This issue might occur when the cluster does not have the correct firewall rule(s) enabled.
If you're trying to access the cluster from a non-Azure IP range, you need to add extra firewall rules.
Refer to Security options and features - Azure Cosmos DB for MongoDB vCore for detailed steps.
Firewall rules can be configured in the portal's Networking setting for the cluster.
Options include adding a known IP address/range or enabling public IP access.
Also, suggest you to verify that the network security group rules are configured correctly. You can check the NSG rules in the Azure portal under the "Networking" section of your MongoDB resource.
Double check the connection string settings are correct. You can check the connection string in your web app's configuration settings to ensure that it is using the correct FQDN and port number.
Also try connecting to the MongoDB server from a different machine to see if the issue is specific to your web app.
Please let us know.