The meaning of the Web.config file has changed in ASP.NET Core. It's still required if you are deploying to IIS, but it doesn't contain any application configuration. In this video, Nate explains what Web.config is used for, and why it's important that your IIS deployment include it. Nate also demonstrates using the publish-iis tool to automatically generate the necessary configuration.
- [Instructor] You may have noticed that there's…a Web.Config file in the directory…along with your published binaries.…It plays an important role, but maybe not…the one you expect.…If you've used ASP.NET Core in the past,…you're probably familiar with using Web.Config…to store configuration for your application.…ASP.NET Core doesn't use Web.Config because it uses…a new configuration model based on appsettings.json instead.…So why is Web.Config in this folder?…It turns out that IAS still needs Web.Config…even if ASP.NET Core isn't using it.…
Web.Config is used to configure the ASP.NET Core module…that IAS uses to act as a reverse proxy to kestrel.…When you run dotnet-publish, Web.Config…is generated for you automatically.…You shouldn't need to touch it or modify it yourself.…It is important that Web.Config exists…in the root of your published application.…It's required for IAS to properly host…your ASP.NET Core application, and it also prevents IAS…from accidentally serving the content…from the project directory, which could contain…
- Setting up your ASP.NET project
- Setting up IIS
- Creating an IIS site and app pool
- Publishing your app with Visual Studio or the command line
- Deploying to Azure
- Deploying to Linux
- Deploying with Docker
Skill Level Intermediate
1. Get Started
2. Deploying to IIS
3. Deploying to Azure
Get started with Azure1m 4s
4. Deploying to Linux
5. Deploying with Docker
- 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.