Default configuration and logging are now set up in the CreateDefaultBuilder method, instead of added into the Configure method of the Startup class. This video introduces the changes and shows how to add additional configuration or logging providers with
- As you just saw Configuration is now built into…the CreateDefaultBuilder method, and in our change…is that an Iconfiguration object is injected into…Startup.cs through the DI container.…This allows you to use an Iconfiguration object…as an injectable instance into anything within your program.…And you can also add additional…configuration using the WebHostBuilder.…So let's look at all this in code.…
So here in my main method I am creating the base builder,…and that's just a helper method I have down here…that calls CreateDefaultBuilder and…UseStartup, but doesn't call build yet.…And then if I want to add in another configuration,…for example, my key vault, I have an extension method here…that's called UseMyKeyVault and UseMyKeyVault…calls the configure app configuration method on the builder…object, which exposes the context and the config.…
The context allows me to get things like the run-time…environment, so context.hostingenvironment. is development,…so I can change how things work based on the environment…
- Running and debugging ASP.NET Core applications
- Pros and cons of migrating existing applications to ASP.NET Core.
- Built-in dependency injection
- Environment awareness and app configuration
- Web host configuration and SSL
- View components invoked as tag helpers
- Configuration and logging
- Using Razor Pages
Skill Level Intermediate
Set up the sample projects4m 49s
1. Get to Know .NET Core
2. ASP.NET Core 1.0
3. ASP.NET Core 1.1
4. ASP.NET Core 2.0
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.