Connect to MongoDB from App Service on public url

Sean Marchiafava 1 Reputation point
2022-09-19T15:27:42.207+00:00

I am unable to connect to my MongoDB cluster from published Web App Service. I can connect fine from local development desktop. I have whitelisted all Azure App Service Outbound IP addresses and even whitelisted 0.0.0.0/0 and still can't connect. I have connected to external URLS successfully from this deployment so I know the application is reaching the internet.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,775 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sean Marchiafava 1 Reputation point
    2022-09-20T19:16:58.14+00:00

    Thanks for your response. I figured out what it was. I did not realize when you publish a Blazor WASM client project that the referenced server project did not get sent as well. Once I realized it was more than my MongoDB controller that was not returning data it finally dawned on me that I need to also publish that project separately. Didn't need a VNet integration and was able to ping Kudu as you recommended so I backtracked to my own project which was missing the server dependency.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.