What is the role of the wwwroot directory in an ASP.NET Core application?
- It contains compiled C# code.
- It stores configuration files.
- It hosts static web assets that can be directly accessed by clients.
- It's used for database migrations.
The role of the wwwroot directory in an ASP.NET Core application is to host static web assets, such as HTML files, images, JavaScript files, and CSS stylesheets. These assets are meant to be directly accessible by clients (e.g., web browsers) without going through server-side code. Placing static files in the wwwroot folder ensures they can be served efficiently and improves the performance of the web application.
Loading...
Related Quiz
- When you want to send a JSON response from your controller, which action result type should you utilize?
- In ASP.NET Core Identity, the _________ option can be used to enforce password histories, ensuring users don't reuse recent passwords.
- _________ is the lightweight, cross-platform web server used by default with ASP.NET Core.
- You've been introduced to Razor Tag Helpers in ASP.NET Core and want to understand their basic usage. What are Tag Helpers primarily used for in Razor views?
- In a project review, you noticed that the production database connection string is exposed in appsettings.json. How should you securely manage this connection string in an ASP.NET Core application?