Forums - C# Corner

Forum guidelines

Details discussion on ASP.NET CORE 2.0

Sep 10 2017 10:36 AM
var config = new ConfigurationBuilder()
.AddCommandLine(args)
.AddEnvironmentVariables(prefix: "ASPNETCORE_")
.Build();

var host = new WebHostBuilder()
.UseConfiguration(config)
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<startup>()
.Build();

host.Run();


Hello,
I am new learner in asp.net.Can you please explain line by line code.What is the purpose of each and every line of the code.

Specially I need a details discussion on configuration setting
var config = new ConfigurationBuilder()
.AddCommandLine(args)
.AddEnvironmentVariables(prefix: "ASPNETCORE_")
.Build();

with regards,
Subrata
Thank you

Answers (1)