In this article, we are going to learn how to register services for different environments in .NET. Let's start. Let's assume we have multiple environments for different purposes: development, and production. In each environment, our application behaves differently. For example, in a different environment, our application connects to a different database and different file storage.