Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How Docker deploys ASP.NET Core programs using Azure Application Services

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

It is believed that many inexperienced people are at a loss about how to deploy ASP.NET Core programs using Azure application services in Docker. Therefore, this paper summarizes the causes and solutions of the problems. Through this article, I hope you can solve this problem.

Usually we write an application and want to deploy and release it, either to a physical machine, to a virtual machine, or to a container to run it. Now that we have the Azure application service, we can ignore these things at all, just write our own code, and then deploy with one click using the release function of VisualStudio. If you feel that the performance is not enough, you can automatically expand and stretch.

Overview of Application Servic

The Azure Application Service is a HTTP-based service for hosting Web applications, REST API, and mobile backends. It can be developed in preferred languages such as .NET, NET Core, Java, Ruby, Node.js, PHP, or Python. Application services not only add the powerful features of Microsoft Azure, such as security, load balancing, automatic scaling, and automatic management, to applications. You can also take advantage of its DevOps features, such as package management, transition environment, custom fields, and SSL certificates.

Quoted from Microsoft Azure documentation

Create an application service resource

Create a new application service resource through the portal console.

Take a name, which will assign a second-level domain name, which will be used to access your application. Select the runtime, operating system, region for. The App Service is also a free service for December free accounts, supporting 10 instances of 60 minutes CPU per day in 1 GB of memory.

Note: SKU and size are charged by default and need to be changed to the corresponding free plan.

Click "change size", select the development / test tab, and select the F1 pricing plan, which is free.

Click create when these settings are complete, and wait a while to prompt the resource creation to complete. Select the new resource, you can see some basic information, as well as some input and output monitoring information and so on.

Create an ASP.NET Core application

Open VisualStudio to create a new ASP.NET Core application, we are just a demonstration, nothing needs to be changed.

Release program

With the new. Net program, we are going to publish it to the Azure application service. Select publish on VS and pop up the publishing interface. Select the IIS,FTP and so on option.

In fact, VS has a deep integration with Azure, in fact, it directly supports the release of application services, but due to network problems, I did not connect successfully, so I could not log in to my Microsoft account, so I had to use FTP to publish.

Go back to the portal portal and select "deployment Center > FTP"

Copy the FTPS endpoint, username and password.

Go back to the VS release screen, fill in the FTP information obtained in the previous step, and click Save.

Click the publish button, and VS will start compiling the code, then publish the code to the specified FTP location, and finally indicate that the release is successful.

Access to application services

As mentioned above, you need to fill in the name when creating a new resource, and this name plus .azurewebsites.net is the corresponding address of the service. Let's have a visit.

You can see that our asp.net core application has been released successfully, and the sample code is ready to run.

Through the above demonstration, we ran our asp.net core application without any virtual machine, Docker, K8S, etc. And it's released directly through VS without any other tools, so it's really convenient. And it also supports automatic expansion, auto scaling and other features that can be done with the touch of the mouse, which makes the development more focused on the code and will not be bothered by the operation and maintenance. The Azure application service is a great feature.

After reading the above, have you mastered how Docker uses Azure application services to deploy ASP.NET Core programs? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report