NetCore Top questions

Post

New Post


Find by name:

NetCore First Name PostDate
What is a Host and what’s the importance of Host in ASP.NET Core application? Ans: ASP.NET Core apps require a host in which to execute. The host is responsible for application startup and lifetime management. Other responsibility of host’s includes ensuring the application’s services and the server are available and properly configured. Don’t confuse yourself with a Server. The host is responsible for starting the app and its management, where the server is responsible for accepting HTTP requests. The host is configured to use a particular server; the server is unaware of its host.
What is ASP.NET Core MVC? How does it differ from ASP.NET MVC? 1. What is ASP.NET Core MVC? ASP.NET Core MVC is a lightweight, cross-platform, open-source web framework from Microsoft for building modern, cloud-ready web applications. It is based on the Model-View-Controller (MVC) pattern, where: Model represents the application’s data and business logic. View handles the UI and presentation. Controller manages input, updates the model, and returns a view or data response. ASP.NET Core MVC is part of the larger ASP.NET Core framework, which unifies web app, API, microservices, and real-time applications under one platform. 2. How does ASP.NET Core MVC differ from ASP.NET MVC? Feature ASP.NET MVC (Old, .NET Framework) ASP.NET Core MVC (New, .NET Core/.NET 5+) Framework Built on .NET Framework, Windows-only Cross-platform (.NET Core/.NET 5+), runs on Windows, Linux, macOS Performance Heavier, tied to IIS Faster, modular, lightweight pipeline with Kestrel Project Structure Web.config, tightly coupled with System.Web appsettings.json, middleware-based, no System.Web dependency Dependency Injection Not built-in, required external libraries Built-in dependency injection Hosting IIS only Kestrel (built-in), IIS, Nginx, Apache, or self-hosting Configuration XML-based configuration (Web.config) JSON, environment variables, command-line args Cross-Platform Development Windows only Cross-platform (Windows, macOS, Linux) Unified Framework Separate ASP.NET MVC, Web API, and SignalR Unified into ASP.NET Core (MVC + API in one) Open Source Partially open Fully open-source and community-driven Razor Pages Not available Introduced in ASP.NET Core as a simpler alternative to MVC for page-focused apps
What is AspNetCore EndPoint? Endpoint routing is enables you to provide routing information such as HTTPs to middleware by matching the request (URL) processing pipeline.