Skip to main content

Posts

Featured

Startup Class in ASP.NET Core

The startup class is the heart of the ASP.NET Core. It helps to configure the application. By default, it has three modes: Startup constructor, ConfigureService Method, and Configure Method. The following is a default MVC Startup class. Startup.cs public class Startup { public Startup(IConfiguration configuration) { Configuration = configuration; } public IConfiguration Configuration { get ; } // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddControllersWithViews(); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler

Latest Posts

In-Memory Cache in ASP.NET Core

ASP.NET Core Web API Documentation with Swagger

Role-Based Authorization in ASP.NET Core MVC

Dependency Injection in ASP.NET Core MVC

Global Authorization Filter in ASP.NET Core

Simple Cookie Authentication in ASP.NET Core

Custom Attribute Validation in ASP.NET Core

IValidatableObject: Class-Level Validation in ASP.NET Core

[Remote] Attribute Validation in ASP.NET Core

GraphQL Hello World in .NET