
I would like to talk about how you can publish a website in Azure. This is quite simple, but I will not talk about very simple things, as this is not at all interesting. You will not find anything about complicated things either. I’ll just write about what I liked and what even surprised me a little.
Rolling up is not a lot of letters, a lot of praises, a bit of criticism, as well as a description of some of the features of Azure hosting, about which, it would seem, everyone should know ...
In order to create a website, you need to click + and select the Web application item in the “Internet + Mobile Devices” category.

')
Then if you want to figure it out yourself. I will only clarify the minimum tariff for Windows hosting, which at the moment I managed to find:

You can use the hosting for free, but if you need to host a domain, the cost is under $ 10. For hosting a single website, this is not particularly cheap. But if you need to host several, then it is more profitable to choose a basic or standard price category. The price will be 3-4 times higher, but you can host several sites at the same time. Support for SSL and many other useful features will appear. As a result, it may happen that the cost of hosting per website is not quite comparable to the cost of a regular non-cloud hosting.
I always didn’t like access via FTP only. After all, using the online file manager is quite convenient. And for some reason I thought that the deployment in Azure comes only from Visual Studio or version control systems. I was surprised to find this:

Publishing by uploading files to OneDrive and DropBox is clearly a great option for me. The rest everything turned out exactly as I imagined.
In order to find out which credits to use for FTP connection, you need to download the publication profile file.

This is a plain text file in which you can find the URL username and password.
If you are migrating your site to the cloud, it is very likely that the video will not be played immediately after the migration. Also, the correct fonts may not be displayed. To solve this, it is necessary in web.config to match file extensions with its MIME (most likely this is required in order to avoid MIME Sniffing).
<system.webServer> <staticContent> <remove fileExtension=".mp4" /> <mimeMap fileExtension=".mp4" mimeType="video/mp4" /> <remove fileExtension=".woff" /> <mimeMap fileExtension=".woff" mimeType="font/woff" /> <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" /> </staticContent> </system.webServer>
In addition, if your site was previously located on a Russian hosting, it can “fly off” the date format due to a culture change. Easy to fix. In the same web.config you need to add
<globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="ru-RU" uiCulture="ru-RU" />
In addition, your date will change to UTC. To return it to your favorite time zone, you need to add a setting with the name WEBSITE_TIME_ZONE and a value that you can take from your local Windows registry to the Application settings. You need to open regedit and go to HKLM \ Software \ Microsoft \ Windows Nt \ CurrentVersion \ Time Zones. here you can choose your own time zone. For example, “Belarus Standard Time” suits me.
Now a few words and screenshots about the functionality of a la file manager. Azure uses an engine called Kudu, in which you can browse the contents of directories and edit files. This is not the only opportunity for Kudu.

Under the link "Forward" we get into a new window

From which already on the link CMD we get to the manager

Not the most obvious way to find a file manager. It is not very obvious that you can download files from your computer using drag and drop.
But the menu item where you can add a domain is quite simple to find - the item “Custom domains”. But as it turned out, in my case, everything is not so simple.
The fact is that Azure allows you to specify a domain using CNAME or A record.
And my domain name registrar does not allow specifying CNAME for a domain. Yes, and in this way there is a minus.
www.yourdomain.com address will be tied, while yourdomain.com is not.
A record remains. This method requires either your registrar to manage the DNS, or create a DNS in Azure. I chose the second option, because the capabilities of my registrar did not give me the right to have another choice. In addition, Azure-ovsky DNS costs a penny, or rather cents. At the moment it is:
The first 25 hosted DNS zones - 50 cents per month
The first billion DNS queries per month is 40 cents.
After creating the DNS zone, the SOA and NS record sets will be created automatically.

You need to add recordsets with the names @ and www, type A and a value equal to the IP of your web application. You can find IP in the “User Domains” item of your application. Additionally, you need to add a TXT record with the name @ for your alias xxxxx.azurewebsites.net This is only necessary to confirm that you are the domain master. After confirmation, this entry can be deleted.
After adding the record sets to DNS, go back to the “Custom domains” item and add host names with type A Record. Need to add 2 names. One with www, and the second without.

One of the advantages of migrating hosting to Azure is that the database connection string can be removed from the web.config to a more secure storage. In addition, you can make some parameters. Moreover, it concerns not only web.config and ASP.NET. You can save connection strings and parameters of other programming languages.

The downside is the lack of mail support. Rather, it is, but it is included in Office365. This seems rather inconvenient to me, although it should be recognized that outlook mail has historically been closer to Live than to Azure.
I transferred my mail to Yandex. Again, I was surprised that it was free. It turns out that now you can buy a domain only in order to have a beautiful email address. The domain verification process is quite simple. It is not necessary to delegate a domain to Yandex. The easiest way to create a file in the root directory.

And after that you need to add a set of DNS records with the following parameters:
