Cloud Course Blog

Web Applications in the Cloud

My goal is to use Azures:Cosmos DB and pair it up with a Razor page web application. I will be going through the steps on how I got it done.

Description of the Application

I created a Cosmos database for this project (named blog6database) then I made a container (name: Users) which will hold my data: first name and a last name, id. We use the database to store our information that our users are inputing. The website has two pages: Home, Users.

The Code

Configure services method

Appsettings.json File

Pages

In this section I will be explaining the pages, and what I added to them.

Azure Website database items

Cost

I used the Azure Pricing Calculator to determine my prices.

For cosmosDb I chose Serverless, the transactional storage 1 gigabyte. For App services, I used a linux operating system.

Very little people visiting the site: 11.50€

For the cosmosDb part I still chose Serverless, and with a storage of 10 gigabytes. For the App Services, I left it the same because even if we had high traffic there isn’t that much to the website.

Lots of people visiting the site: 15.58€

Look of the website

Here is two pictures of how the website looks when its running.

Home Page

Users Page

Resources

Bootstrap Docs: List group

Microsoft Docs: Tutorial ASP.NET Core MVC web application with Azure Cosmos Db

W3 Schools: HTML forms

Microsoft Docs: Introduction to Razor Pages in ASP.NET Core

Microsoft Docs: Tutorial: Get started with Razor Pages in ASP.NET Core