.NET Core Advance

What is AddSingleton, AddScoped and AddTransient method?

v AddTransient  instance will not be shared at all, even with in the same request. Every time a new instance will be created. v AddSingleton method create only one instance when the service is requested for first time. And then the same instance w…

How ASP.NET Core Middleware is different from HttpModule?

v HttpModules are nothing else, but they are very similar to Middlewares only.   v HttpModules are registered in the web.config or global.asax file of the ASP.NET framework, while a Middleware is registered via Configure method of the startup.c…

What is Request Delegate in .NET Core?

v Request delegates are used to build the request pipeline.  v Request delegates are configured using Run , Map , and Use         extension methods.

What is Run(), Use() and Map() method?

v For any request, Use method will execute the middleware component and then pass the execution to the next middleware or component. v Run method will execute the middleware component and then terminate the execution. v It should be placed …

What is Routing? Explain attribute routing in ASP.NET Core?

v Routing in MVC is the process of mapping a URL request to a specific controller action in a web application. v The routing system is responsible for directing incoming requests to the appropriate controller, based on the URL. v The routing system …

How ASP.NET Core serve static files?

v WWWROOT contains all the static files.    v USESTATICFILES() enables the static files to be served to client.

What is In-Memory caching & Distributed Caching?

v Redis is an open-source, highly replicated, performant, non-relational kind of database and caching server.  v When to use which caching?   In normal cases where the application size is small, use in-memory cache. But where application is ve…

Load More
That is All