Web Development
Basic components to develop and deploy a simple web application.
Step - 0: Setup App Services and Database
Go to Portal.Azure.com
Azure.portal.com is the web-based portal for Microsoft Azure, a cloud computing platform. The portal allows users to manage, build, and monitor their Azure resources
What can you do with the Azure portal?
Manage resources: Create, modify, and monitor resources such as virtual machines, databases, storage, and web apps
View subscriptions: See details about your subscriptions, including costs, IDs, and billing periods
Set alerts: Create alerts for when costs exceed a certain limit
Create dashboards: Customize dashboards to organize resources
Configure accessibility: Adjust accessibility options for a better experience
View monitoring data: See basic monitoring data for active virtual machines and services
Using the User ID and Password, log onto your Azure Portal
User ID: cms*******
Password: *******
Based on the project needs, create appropriate resources. For CMS 101 class, we need Web App and a Database.
How to create App Services - Web Server
Go to Portal.Azure.com
Click on App Services
Once you click on "App Services", Click on "Create" link and select either "Web App" OR "Web App + Database"
For simple Website that does not need a database, use "Web App". Please note that when you chose this option, there will NOT be a database where you can save the data.
Fill appropriate details and click on "Review + Create"
Once Web App is created, Click on the App Service you created
This is the URL for the App Service - Web App that I created....
https://cms2024-25-0-d2fxfyfzbwgjgqg8.centralus-01.azurewebsites.net
Lauch the URL. If you see this, it means that your Web App is running and is waiting for your content
Step-1: Develop Web Application using Visual Studio
To develop a web application in Visual Studio, you'll want to leverage
ASP.NET Core Web App (Model-View-Controller) template. This template provides a solid foundation for building modern web applications using the .NET framework.
OR
Choose "Blazor WebAssembly App" for a client-side application that runs in the browser.
Here's a step-by-step guide on how to get started:
aunch Visual Studio and create a new project.
Select "ASP.NET Core Web App (Model-View-Controller)" from the available templates.
Configure your project.
Enter a project name (e.g., "MyWebApp"), choose a location for your project files, and select the desired .NET version.
Customize your project (optional).
You can choose to add authentication, configure authorization, and select a specific framework (e.g., ASP.NET Core MVC, Razor Pages).
If you dont use authentication, there will not be a login page.
Create your project.
Visual Studio will generate a basic web application structure, including views, controllers, and models.
Start coding.
Begin developing your web application by adding logic to your controllers, creating views, and implementing models.
Start the project (Step-2 in the diagram):
Press F5 or select "Run" to start the application.
The app will launch in your default web browser.
Step-3: Publish website to App Services - Web App
From Visual Studio, you can launch your website in a local browser by clicking on the "Run" or F5.
The Website that you developed is local to your laptop/computer.
Others cannot launch as they do NOT have access to your computer.
In order for others to launch your website, you need to publish your content to a app server (which is what you have created in STEP-0)
Steps to Publish your website to Azure App Service Web App
Make sure that "Solution Explorer" is visible for the Web Project that you created (in Step-1)
If you dont see "Solution Explorer", click on View-->Solution Explorer menu item
In the "Solution Explorer", right click on the project
Click on "Publish". This is to push your web site to Azure App Services Web App
Select the correct Azure account and publish to the right App Service
Step-4: Setup DevOps, CI/CD pipeline