Wanted to provide information about publishing .NET web applications with the Azure Cosmos DB API for MongoDB. The tutorial demonstrates how to update the connection string in the project (see: update connection string). The following section details how to install the MongoDB driver (see: run the web app). The next step would be to publish the solution to Azure App Service, as the Quickstart has you build and run the solution locally in Visual Studio while connected to your Azure Cosmos DB API for MongoDB instance remotely.
Quickstart: Build a .NET web app using Azure Cosmos DB's API for MongoDB (link)
For information on how to publish a web application to Azure App Service, please see the following: Publish a Web app to Azure App Service using Visual Studio. The difference between a non Cosmos DB based web application and a Cosmos DB API for MongoDB based web application is the driver and connection string reference in the code base where a non Cosmos DB web app uses web.config and the connection string entry in the App Service settings.
Please make sure your solution has the correct driver installed and the code base includes the connection string. If you can run the solution locally in Visual Studio and connect to the remote instance of the Cosmos DB API for MongoDB then the solution should run in the App Service environment. The only item that would prevent connectivity would be firewall related (public endpoint versus selected network endpoint).