Posted inBlog UseWhen extension method in ASP.NET Core Posted by By Abdul Khursheed February 13, 2025 UseWhen() is a powerful extension method in ASP.NET Core's IApplicationBuilder interface. It allows you to conditionally add middleware…
Posted inASP.NET CORE MVC Order of Middleware Pipeline in Asp.net Core Posted by By Abdul Khursheed February 13, 2025 1. Exception/Error Handling:Purpose: Catches and handles exceptions that occur anywhere in the pipeline.Examples: UseExceptionHandler, UseDeveloperExceptionPage (for development environments).2. HTTPS…
Posted inASP.NET CORE MVC Custom Conventional Middleware in Asp.net Core Posted by By Abdul Khursheed February 13, 2025 ASP.NET Core middleware comes in two flavors: conventional and factory-based. Conventional middleware, as shown in…
Posted inASP.NET CORE MVC Custom Middleware in ASP.NET Core Posted by By Abdul Khursheed February 13, 2025 ASP.NET Core provides a plethora of built-in middleware components, sometimes you need to create your…
Posted inASP.NET CORE MVC Middleware app.Use vs. app.Run in Asp.net Core Posted by By Abdul Khursheed February 13, 2025 These two methods are fundamental for adding middleware to your pipeline, but they have key…
Posted inASP.NET CORE MVC HTTP Call in .Net 8 Posted by By Abdul Khursheed February 13, 2025 Add details in implementation class - private readonly IHttpClientFactory _httpClientFactory;public BaseService(IHttpClientFactory httpClientFactory){_httpClientFactory = httpClientFactory;} Add…
Posted inASP.NET CORE MVC Need of Microservices in .Net Posted by By Abdul Khursheed February 13, 2025
Posted inASP.NET CORE MVC Swagger Configuration in .Net 8 Posted by By Abdul Khursheed February 13, 2025 Install Nuget package in your solution - Swashbuckle.AspNetCoreUse below configuration in your Program.csvar builder =…
Posted inASP.NET CORE MVC Shared Views in Asp.net MVC Posted by By Abdul Khursheed February 12, 2025 Shared view is a view file (.cshtml) that is not tied to a specific controller…
Posted inASP.NET CORE MVC ViewImports in Asp.net Core Posted by By Abdul Khursheed February 12, 2025 _ViewImports.cshtml file is a special file in ASP.NET Core MVC that allows you to centralize common…