Most parts of elmah.io consist of small services. While they may not be microservices, they are in fact small and each do one thing. We recently started experimenting with ASP.NET Core (or just Core for short) for some internal services and are planning a number of blog posts about the experiences we have made while developing these services. This is the third part in the series about the configuration system available in Core.
In the previous post, we saw how to switch configuration by specifying the ASPNETCORE_ENVIRONMENT
environment variable. Let’s try to deploy our website to Azure App Services. I’ve already created a new web app on Azure. To keep this post simple, I will deploy the website directly from Visual Studio, but in real life, you probably want to use Kudu, Octopus Deploy, Visual Studio Team Services or similar. Before deploying the website, we want to make sure that both appsettings.json
and appsettings.Production.json
are deployed. Add the production file in Project.json
like this:
{
...
"publishOptions": {
"include": [
"wwwroot",
"**/*.cshtml",
"appsettings.json",
"appsettings.Production.json",
"web.config"
]
},
...
}
#aspdotnet core #azure