1. Home
  2. Training Library
  3. Microsoft Azure
  4. Courses
  5. Getting Started with Azure App Service

Create an Azure SQL Data Source

Start course
1h 22m

You’ve got an idea for a great web app, or maybe you’ve already started building it. The next question is how are you going to get it out there on the Internet?

In this course, you will learn how you can quickly and easily set up a website and publish your app to the world with Azure App Service. Of course, web apps are a lot more complex and varied than just HTML pages and we will see how App Service supports a range of programming languages, frameworks, and even operating systems. We will explore features that greatly simplify application deployment and management, as well as those that will increase your app’s functionality like authentication and accessing on-premise data. App Service as with other Azure products has a raft of tools for monitoring and logging so you can make sure your app is performing optimally.

For any feedback, queries, or suggestions relating to this course, please contact us at support@cloudacademy.com.

Learning Objectives

  • Deploy apps using the Azure App Service
  • Create a web app using the Azure Portal
  • Create a web app using Visual Studio
  • Understand the configuration and diagnostic capabilities available from Azure App Service
  • Understand the advanced features of the service such as container deployment and deployment slots

Intended Audience

This is a beginner level course suited developers or anyone wanting to know how to deploy web apps to the Azure cloud.


To get the most from this course, you should have a basic understanding of the software development lifecycle, while knowing how to code would be a plus.

Course source code

.NET 5.0 demo code



Docker Hub



.NET Core 3.1 demo code






From the main search bar, I'll find and select SQL databases. On the databases home page, click Create SQL database, which takes us to the Create SQL Database wizard. I'll select the existing resource group NewWebApp and give the database the name lorrylog. I don't have a database server, so I'll create a new one called lorrylogserver located in the East US 2 region with a server admin called lorryadmin.

Next, I'll configure the database SKU, setting it to basic, as in no way could I call the workload demanding. I'll quickly step through the following configuration pages accepting the default settings and hit the create button. Once the resource is created, we can go to the database and make it accessible to other Azure resources like App Service. Go into set server firewall and allow Azure services and resources to access the server by clicking yes. While I'm here, I'll create a firewall rule so I can access the server from outside the Azure ecosystem. Click save to apply the new settings.

We have one database and server login called lorryadmin, which has complete access and authority over all databases on the server and should just be used for server-level operations. In the spirit of least privilege access, we need another login specifically for the lorrylog database. A database login that is restricted to one database is called a contained user and is ideal for an application to use its connection string. Let's use the cloud shell to create a contained user for the lorrylog database. This is a two-step process where we create a new server login and then create a database user from the login. We'll need to login into the master database on the lorrylogserver with the admin account. Once in, we create the login with a password. Yes, I am using the same password for both users, which is something you wouldn't do outside of a demonstration. Having created the login, I'll disconnect from the master database by typing exit and connect to the lorrylog DB. You can see the server variable I set to lorrylogserver at the beginning of the session is still valid and concatenated with database.windows.net makes up the full name of the database server. Create user from login creates our contained database user. Finally, I want to give the lorries user full control over the lorrylog database by assigning them the db_owner role using the system stored procedure sp_addrolemember. We could create a database table here in the shell session, but I want to show you Azure Data Studio, a nifty cross-platform desktop tool for interacting with Azure databases. If you're familiar with SQL Server Management Studio, it's the same concept but not quite as sophisticated.

I'll fast forward through the installation and begin by creating a new connection to the lorrylogserver. When I paste in the server name, the connection details realize I've trailing spaces and trims them for me – lovely. Still, it could have done that without telling me I was clumsy with my copying. The authentication type is SQL Login, and I'll use the contained lorries user login. With a contained user, you must specify the database to connect to. If you don't, it will default to the master DB, which the user isn't authorized for, and the connection will fail. Now that we've set up the connection, I'll select it, open a new query window, run a script to create a vehicle table, and then insert a record into it.

About the Author
Learning Paths

Hallam is a software architect with over 20 years experience across a wide range of industries. He began his software career as a  Delphi/Interbase disciple but changed his allegiance to Microsoft with its deep and broad ecosystem. While Hallam has designed and crafted custom software utilizing web, mobile and desktop technologies, good quality reliable data is the key to a successful solution. The challenge of quickly turning data into useful information for digestion by humans and machines has led Hallam to specialize in database design and process automation. Showing customers how leverage new technology to change and improve their business processes is one of the key drivers keeping Hallam coming back to the keyboard.