1

Can I host a web application created on .net core 2.1 with sql server as database to azure web app service using CI tools / MS WebDeploy?

The following points I want to take care:

  • The application is using file system for temp storage and file storage
  • Deployment should be managed by some CI tools such as jenkins
  • After deployment, the app settings file should be modified with some keys/server details
  • Log files(stored on app root) should be accessible by application administrator

Is there a way to create a virtual directory same as in IIS and upload the files using FTP or similar protocols..?

George Thomas
  • 125
  • 2
  • 12

1 Answers1

1

All your doubts about deploying .net core 2.1 web app are achievable.

Suppose our projects are all completed and uploaded to github.

Questions and explanations about your concerns:

  1. About the connection configuration using the database, you can directly configure it in web.config. If you are using azure sql server, find the connection string, set up the firewall, and pass the SSMS test, you can test the connection in the code. It can also be added in the Configuration -> Application settings -> Connection strings in the portal. After the addition, the priority is higher than the configuration in web.config, which will override the configuration and not modify the web.config file.

  2. Regarding the use of file storage, you can use azure storage services or not. Looking specifically at the business, for example, very small pictures, documents and other files can be stored in the current program running directory, which is consistent with the original development at the code level. When publishing, you need to include the MyFiles file in the publishing process, or wait for the publishing to be completed and add folders manually in kudu, or the program can judge. It is recommended to use the program to judge that the subsequent program upgrade will not lose data.

enter image description here

  1. The confidential information in the app settings file can actually be configured in web.config or appsetting.json. Make sure that the offline project is running properly when you are debugging locally, and then you can publish it. The rest is configured in the portal as in the first explanation.

  2. The Log Files file storage can fully achieve the effect you want. It should be enough to set the owner permissions of this app services. For details, please refer to the official documentation.

  3. Virtual directories and virtual applications, I have a better answer in another post here, you can refer to it.

Steps:

First of all, we can create a web app in portal and select .net core 2.1. Create appservices, and click Deployment Center when finished.

enter image description here

enter image description here

enter image description here

enter image description here

Follow the prompts step by step, and wait until the Action in github is completed, and the release is successful.

Jason Pan
  • 15,263
  • 1
  • 14
  • 29