►
From YouTube: S306 - Customizing ASP.NET Core - Jürgen Gutsch
Description
ASP.NET Core has many options to customize, to match all of your requirements. It's not only running on Linux, Mac and Windows, it also has many possibilities to modify the whole framework in an arbitrarily way. Juergen shows you 10 of the most important things to modify.
A
B
B
B
A
A
B
Developers
so
I
like
to
do
that
the
whole
stack
from
from
top
fraction
or
CSS
JavaScript.
You
see
sharp
Animax
opportunity.
No,
it's
I'm
logging
on
a
three
turn.
It
check
it
at
work
and
I
was
writing
articles
on
that
gender
of
night
scenes
leading
a
user
would
be
powerful
and
maybe
the
last
in
organization
were
white,
I'm,
sure
I.
B
B
For
the
searches
of
the
link
is
in
society,
yeah,
that's
the
agenda
for
today
or
ten
different
topics
and
because
of
which
the
topics
doing
the
demos.
It's
okay,
to
ask
questions.
Sorry,
mother!
That's
about
five
for
me!
So
the
first
topic
is
about
looking
how
you
customize
your
looking
or
I
had
and
custom
blocker
or
whatever
you
want
to
do
agent.
Dependence
means
action,
HTTP
and
host
services
really
like
we
learned
something
in
the
background.
B
Middleware
start
for
madness.
Moral
blindness
extra
filters
help
us
as
a
considering
we
go
from
from
the
t-shirt
again
up
to
the
edge
of
the
view.
Let's
start
I
hope
on
here.
Cuz,
we
don't
need
it
anymore
turns
off.
First
I
can
do
I
will
do
it
is
I
gave
it
to
victim
topic,
two
different
round
selection
for
us,
so
the
first
minister
sticky
a
good
to
the
first
one
apart
logging
and
create
a
new
NBC
application.
B
B
Sound
pretty
open
another
laugh
code
codes,
it
starts
to
be
fast
yeah.
Let's
take
a
look
into
the
blowing
in
provisions.
We
had
some
logging
configuration
in
the
startup-
that's
not
there
anymore
has
been
so
I
think
it's
now
isolated
and
hidden
in
this.
In
the
default
configuration
yeah,
Mike
Rinder
map
post,
we
created
with
the
default
better
configurator.
B
Able
to
write
the
lucky
configuring,
adding
or
using
an
extension
method
to
configure
logging
and
what
you
see
here
is
exactly
what
the
same
would
that
is
hidden
inside.
So
that's
a
login
configuration
that's
loaded
from
the
on
the
app
settings,
Jason
and
dannan,
console
logger
or
debug,
and
a
debug
Louis
attitude
after
they're
logging
here.
So
that's
pretty
much
it.
So
we
don't
have
any
logging
into
a
file
or
logging
into
a
database
or
whatever.
B
B
B
B
B
B
So
we
still
use
the
console
logger
here
and
debug
logger
yep.
So
this
is
the
information
log
info
and
let's
get
coded
in
red,
doesn't
make
sense
actually,
but
it's
nice
to
see
how
the
the
logger
and
laga
provider
works.
Yeah
and
all
the
other
informations
also
cut
it
to
cut
it
in
a
right.
So
a
more
real-world
scenario,
where
is
to
add
a
real
logging
engine.
So,
for
example,
and
look
so
to
add
analog.
We
need
to
add
a
package
to
a
project.
B
B
B
B
B
B
B
Like
the
logging
part,
there's
also
no
configuration
configure
thing
here
in
the
startup
as
on
previous
versions,
we
only
have
this
configuration.
This
is
already
configured
that
passed
in
into
the
stirrup
and
can
use
it,
and
the
actual
configuration
is
also
hidden
inside
the
default
builder.
So
here's
well.
We
can
override
all
these
configurations
here
so
and
this
also
exactly
what
is
configured
inside
the
the
84
builder.
So
we
have
this
environment
here
which
gets
passed
in
with
this
builder
context.
B
B
Something
is
the
environment
name
here,
and
we
see
that
here
we
have
the
up,
setting
stood
Jason
and
the
up
setting
start
development
of
Jason,
so
the
second
one
is
optional
and
the
first
one
is
not
optional,
so
the
second
one
is
able
to
override
the
settings
from
the
first
one.
So
that's
pretty
clear,
that's
done
it
also
load.
The
environment
variables
usually
asked
the
last
instance.
A
B
So
let's
have
a
look
here.
That's
the
standard,
app
settings,
JSON
simply
put
another
node
here,
call
it
up
settings.
We
have
a
setting
called
for
another
setting
called
bar
and
to
load
that
up
settings
in
is
pretty
easy
and
straightforward.
So
this
is
simply
done
by
creating
our
app
settings
class
and
it
unistart
up.
Usually
you
should
do
it
in
a
separate
file.
B
B
Yeah
we
access
our
app
settings
via
the
value
object
of
this
I
option
object
and
then
we
use
that
this
time
I
implement
all
the
stuff
here,
because
we
need
to
test
some
some
more
configurations
later
on
so
I
go
to
the
index.html
and
passed
in
some
more
simpler
code
than
that.
So
I'll
delete
that
and
just
show
the
title
and
the
message.
B
B
So
what
do
you
also
can
do?
We
can
unload
settings
from
from
different
other
files?
So
let's
go
back
to
the
programs?
Yes,
let's
see
what
is
what
else
we
have
in
the
config
object
here.
So
we
have
the
add
command
line,
so
we
can
use
a
command
line
options
to
configure
our
applications.
We
can
create
in-memory
collection,
which
is
just
a
key
value
collection.
B
B
B
B
Refresh
the
page
yeah
now
it's
fubar,
but
that's
the
value
from
the
any
file
so
from
from
the
community.
There
are
a
lot
more
configuration
providers
available
for
a
llamo,
for
example,
or
maybe
for
to
load
configuration
from
a
database
or
whatever
and
you're
also
able
to
create
your
own
configuration
providers.
You.
A
So
there
was
a
question
about
a
pixel
log
and
when
you
were
using
console
log
you
you
wrapped
it
with
a
lock
when
you,
when
you
wrote
your
console
logger.
Was
that?
Because
it's
not
thread.
A
B
A
B
Wrapped
it
because
I
want
to
want
to
look
in
in
the
right
order,
I
want
to
confuse
with
the
order.
Maybe
we
don't
need.
This
I
had
some
some
issues
with
the
coloring
that
the
the
I
had.
There
was
a
race
condition
between
the
different
lock
entries,
then
so
that
the
wrong
log
entries
get
colored
in
the
wrong
color.
B
B
B
Yeah
and
you're
really
able
to
to
replace
the
existing
dependence
injection
container
with
with
a
custom
one
and
in
this
demo,
I
try
to
do
that
with
the
myth.
What
its
name
well
yeah
dude,
without
effect
I
saw.
The
project
is
done.
Cd
to
the
eye
sample,
also
open
that,
in
a
new
code
window
close
that
oops
close,
that.
B
B
B
A
B
B
Yep
to
addict
own
dependency
injection
containing.
We
need
to
change
this
method
to
configure
services
a
little
bit.
So
it's
it's
absolutely
legal
to
change
the
signature
oops,
the
signature
name.
So
I
can
return
an
iced
service
provider
and
I'm
able
to
create
a
service
provider
out
of
the
service
collection.
B
Services
billed
service
provider,
that's
it
so
this
still
works.
So
this
is.
This
is
absolutely
a
kay
to
change
the
method
like
this.
So
what
I
wanted
first
to
demonstrate.
Dependency
injection
is
to
change
the
the
home
control
a
little
bit.
I'm.
Sorry
because
it
jump
a
little
bit
around
here.
So
I
request
the
I
service
inside
the
home
controller
and
I
changed
the
razor
view
of
let's
use
the
about
view
a
little
bit.
B
So
that's
the
smallest
one
yet
well,
let's
use
contact,
makes
more
sense,
so
so
I
had
a
for
each
loop
here
and
the
rest
is
done
later
right,
no
I'll
go
back
to
the
controller
and
changed
this
part.
So
I
used
the
I
service,
request
all
persons
and
returned
the
person's
back
to
to
the
view.
So
we
have
a
list
of
persons
in
the
view
we
need
to
change
the
model
a
little
bit.
B
B
A
B
I'm
done
so
that
should
be
the
default
registration
way
yeah.
So
that's
truly
need
to
have
a
look,
whether
it's
working
or
not,
it
does
not
run
so
I
want
to
ensure
that
all
the
service
collection
configuration
is
working
before
I,
replace
the
DI
container
with
the
with
the
artifact.
So
that
looks
good.
B
B
Ok
need
to
restore
it
and
we
can
add
the
artifact
configuration.
So
these
are
some
lines
of
code.
This
could
be
wrapped
different,
different
methods
when
I
put
it
in
here.
So
we
don't
return
the
the
standard
build
service,
standard
service
provider.
We
use
the
service
provider
from
artifact.
In
that
case,.
B
B
So
we
stored
in
the
and
the
startup
to
reuse
it,
and
then
the
application
container
build
a
container
gets
passed
into
the
out
of
pack
artifact
service
provider.
You
can
also
create
your
own
service
prior
now,
if
you
want
to
maybe
support
some
other
dependency
injection
Canham,
not
sure
if
ninj
act
currently
brings
his
own
service
provider.
Well,
when
I
last
tried
it
I
needed
to
create
this
service
container
themself
so-
and
this
is
special
here,
because
we
need
to
reaches
to
all
the
already
registered
services
inside
the
artifact
container.
B
B
B
So
when
should
you
replace
your
there
that
a
for
dependency
injection
container,
usually
it
doesn't
make
sense,
because
the
current
one
works
pretty
well,
but
there's
some
other
dependency
injection
containers
with
nice
features.
For
example,
inject
can
I,
have
look
into
a
folder
and
search
for
assemblies
with
the
right
services
inside
and
so
on.
So
there's
an
auto
registration
in
inject,
for
example,
and
maybe
you
like
these
features
and
want
to
use
it
in
asp.net
core
too.
B
B
But
currently
it's
it's
working
using
the
the
window,
certificate
store
on
Windows
and
Linux
and
Mac.
You
can
pass
in
your
own
certificate
file
and
sometimes
I
really
like
the
idea
to
to
use
specific
certificate
file
instead
of
using
the
certificate
store
and
Windows,
and
you
can
use
this
in
an
asp.net
core
and
Windows
too.
B
As
you
can
see
in
the
startup,
you
already
have
some
configurations
about
HTTP,
so
we
have
an
HTTP
redirection
here
so
that
redirects,
the
HTTP
requests
to
HTTPS
and
also
have
this
H
HSTs
middleware
here
to
enforce
a
certificate,
validation
and
also
hidden
in
the
program
CS
we
have
the
configuration
up
of
HTTP.
Orchestra
is
already
listening
on
the
HTS
HGPS
port,
so
this
is
configured
and
the
program
also
hidden
in
that
method.
B
We
can
also
override
this
and
to
use
our
own
certificate
file.
We
can
add
the
port
here
which
sure
bill
is
none.
We
register
the
address
of
the
port
balance
and
listen.
Options
on
these
options
enables
HTTP
on
that
port
and
we
can
add
our
certificate
file
here.
So
this
is
a
certificate
pfx
and
a
top
secret
password.
B
It
was
a
Dropbox
era
service
certificate.
It's.
B
This
won't
work
because
of
the
brown
hostname.
Currently
the
certificate
is
created
for
localhost
and
not
for
this
IP
address
whenever
try
to
that
it
will
work.
So
it's
a
secure,
that's
a
secure
connection
with
custom
certificate
file
so
usually
on
Windows.
You
should
use
the
certificate
store,
but
sometimes
it's
easy
easier,
maybe
to
change
to
our
specific
file
or
in
the
special
case
when
you
want
to
run
the
applications
in
a
non
Mac,
Linux
and
Windows
without
different
configurations.
B
B
B
What's
that
no
document
format
FS
eShop
for
us?
No,
it
worked
previously.
So
it
still
entered
like
this.
So
the
hosted
service
is
derived
from
from
hosted
service,
simple
class.
Nothing
special
here,
I
pass
in
the
logger
here,
because
I
want
to
show
that
the
background
tasks
via
the
console
logging
and
we
have
a
start,
a
sync
method
and
a
stop
async
method,
and
usually
we
start
doing
the
tasks
in
in
the
start,
acing
class
and
clean
up
some
things
in
the
stop
async
method:
it's
not
necessary
and
then
we
create
a
new
task.
B
B
B
A
B
B
A
B
So
we
can
put
some
things
into
the
pipeline,
some
more
middle
ways
to
show
how
new
rates
are
working.
So
the
ordering
matters
here,
that's
important
to
know
so.
The
first
middleware
gets
executed,
the
Asus
first
one
and
the
second
one
its
second
place,
and
that's
the
last
one.
So
we
have
two
different
kind
of
mini
waves.
We
have
the
app
use
Miller
wares,
which
are
calling
a
next
middleware.
The
next
one.
B
B
B
B
Okay,
it
says
we
need
it
in
the
second
center.
Now
it's
cached
almost
cached,
so
it's
working,
we
can
do
it
some
more
with
middlewares.
We
can
add
routing
something
like
routing.
So
it's
custom
writing
so
I
define
them
emitter
where
we
just
mapped
on
that
route
here.
So
we
can't
continue
the
pipeline
inside
this
map
the
same
with
a
different
map
and
no
one
wants
to
use
these
kind
of
middlewares.
I.
Think
the
most
common
way
to
create
middlewares
is
to
create
a
middleweight
class,
same
effort
here,
a
same
class.
B
B
B
A
Then,
when
you
showed
us
a
little
bit
about
using
auto
faq
that
isn't
really
needed
right,
that's
nice
to
have.
If
you
really
need
some
of
those
extended
features
of
auto
fact
for
for
dependency
injection,
what
kinds
of
things
do
you
see
using
auto
faq
in
that
model?
For
you
know
what
what
are
the
real
things
that
make
you
say?
Oh
my
gosh.
Yes,
this
is
why
I
need
to
use
auto
faq.
B
Yeah
what
effect
I
use
artifact,
because
it's
an
easy
demo,
because
they
already
implemented
a
service
provider
but
a
real
act
if
the
features
of
an
inject,
for
example,
outer
register
classes
and
services
from
from
different
assembly.
I
can,
I
can
tell
inject,
please
look
in
this
directory
and
load
me
all.
Then
all
the
needed
to
services,
that's
a
nice
feature
of
ninja
and
you
can
use
any
other
di
container,
which
somebody
use
have
this
feature
inside
out
effect
is
also
pretty
simple
one,
like
the
nice
peter
net
for
dependency
injection
container.
A
B
A
B
B
The
goal
is
to
register
output
format
as
to
not
only
output
the
persons
in
an
adjacent
format,
but
maybe
in
n
CSV
or
in
in
a
vCard
output
as
well.
So
what
I
need
to
do
is
to
register
some
output
feminists.
This
is
done
and
stirred
up
right.
Yes,
it's
done
in
startup
and
registration
of
MBC,
so
I
had
some
embassy
options.
B
B
B
A
B
B
B
B
B
A
That
is
awesome,
stuff,
jörgen
wig.
It's
great
to
see
that
the
output
for
matters
in
in
asp,
net
core
and
web
api
are
still
there
and
there's
still
great
things
that
we
can
use
right
so
that
a
web
api
can
learn
from
what
type
it
is
that
you're
requesting
and
just
respond
and
reformat
stuff
without
you,
as
an
api
author
having
to
go
and
write
all
of
that
translations
stuff
like
I
might
do.
If
I
was
writing
it
with
a
razor
page
right,
yep,
exactly
awesome.
B
A
Very
cool
stuff,
thank
you
so
much
arrogant
for
joining
us
here
at
dotnet.
Confer.
We
really
appreciate
you
taking
time
presenting
walking
us
through
all
this
stuff
for
everybody
in
the
chatroom.
If
you
liked
what
you
saw,
this
will
be
archived
and
it'll,
be
over
on
YouTube
a
little
bit
later
and
we're
going
to
be
re
running
all
of
dotnet
conf.
A
All
weekend
long
you're
gonna
be
able
to
watch
anything
that
you
may
have
missed,
or
if
it
was
airing
during
a
time
zone
that
wasn't
during
a
time
it
wasn't
good
for
your
time,
so
you'll
be
able
to
check
it
out.
So
thanks
so
much
uragan.
We
really
appreciate
it
and
we'll
catch
your
legs
too
honey.
Thank
you.
A
A
B
A
Doing
right
good
morning,
it
is
now
we're
closing
in
on
at
6
a.m.
Pacific
time.
This
is
that
we're
into
our
13
of
the
24
Hours
of
dotnet
comp
good
morning
think
bot
labs
great
to
see
you.
We've
got
some
more
great
content.
Coming
up,
we're
gonna
be
bringing
in
Edward
Thompson
in
just
a
few
minutes.
He
that
London
right.
A
Cambridge,
okay,
so
you've
got
them
all
set
to
go
over
there.
We're
gonna
go
to
a
quick
break.
While
we
get
you
while
we
get
Edward
dialed
in
I
hope
you
stick
around
with
us
for
the
next
hour
sliding
right
in
a
strange
name.
Yes,
there
is
brady
gasps,
sir,
and
there
he
goes
so
stay
tuned.
We're
gonna,
we're
gonna,
get
Edward
all
set
up
here
and
we'll
see
in
just
a
minute.