Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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

What I have tried:

I try to find the solution from asp.net core 2.0 Microsoft document but I am unable to understand.
Posted
Comments
Richard MacCutchan 10-Sep-17 11:55am    
Sorry, but no. This is the quick answers forum for specific technical problems. If you want to learn ASP.NET, or any other framework or language, there are many books and tutorials available.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900