6
In ASP.NET 5 in the method Configure
class Startup
we can receive in the parameters a reference to an object whose class implements IHostingEnvironment
. One of the properties of this class is EnvironmentName
. I have seen in example codes a check on this property to detail errors or not. If this property is Development
then it comes to the development environment and shows up the errors in detail. Otherwise it is the production environment and shows a friendly page warning that an error has occurred.
So far so good, what I don’t understand is how this property is defined. Why does every time I run it have value "Development"? How this property is really defined?