Author, TechWriter

Configure Method in .Net Core

Hits: 430

The Configure() method handles the HTTP request by configuring the request pipeline.
Several extension methods are used to configure the pipeline.

IApplicationBuilder: Configure the application request pipeline
Get more details on this:

IHostingEnvironment: Provide information about application hosting(“Development/Production”)
Get more details on this:

ILoggerFactory: Built-in providers that send logs to one or more destinations
Get more details on this:

Configuration.GetSection(“Logging”) access the appsettings values
go to appsetting > Logging

loggerFactory.AddConsole() add log output when we run our app from the command line
loggerFactory.AddDebug() add log output when we run in Visual Studio in Debug mode, go to Output window in Visual Studio.
we can access the log, here’s how:

env.IsDevelopment() is for managing the exception if happen in development or production environment
get more about working with multiple environment:

app.UseStaticFiles() is for serving the static files from /wwwroot like html, css, js
get more details:

Post a comment