skip to Main Content

Timeout when Connecting to MongoDB Atlas from Azure App Service

I'm trying to connect to my MongoDB database using the following setup: public ReplybotServiceLayer(MongoDbSettings databaseSettings) { var connectionString = $"mongodb+srv://{databaseSettings.User}:{databaseSettings.Password}@{databaseSettings.Cluster}.mongodb.net/{DatabaseName}?w=majority&connect=replicaSet"; var client = new MongoClient(connectionString); var database = client.GetDatabase(DatabaseName); _guildResponsesCollection = database.GetCollection<GuildResponseEntity>("responses"); _guildConfigurationsCollection = database.GetCollection<GuildConfigurationEntity>("configuration"); } public async Task<IList<TriggerResponse>?> GetResponsesForGuild(ulong…

VIEW QUESTION
Back To Top
Search