Akshay Khot has Published 41 Answers

Explain the ASP.NET Core support for multiple environments for development and production

Akshay Khot

Akshay Khot

Updated on 22-Jun-2021 15:10:35

Running an application in production for live customers is very different from running it when you are developing it on your local machine. In production, your application is hosted on a server which has very different configurations and specifications than your computer. Various services that your application talks to, such ... Read More

How do you configure ASP.NET Core applications?

Akshay Khot

Akshay Khot

Updated on 22-Jun-2021 15:04:21

During the development of an application, and even after it’s built, you often need to change various settings that control how the application behaves. Configuration refers to the external values that control an application's behavior, consisting of settings and parameters that the application uses at runtime.The best practice regarding storing ... Read More

How to schedule background tasks (jobs) in ASP.NET Core?

Akshay Khot

Akshay Khot

Updated on 22-Jun-2021 14:58:24

Background tasks, also called as jobs, are essentially services that aren’t meant to execute during a normal flow of the application, such as sending email confirmations or periodically cleaning up the database to purge the inactive accounts. These jobs are not meant to interact with the customers or process user ... Read More

What is SignalR and how to use it?

Akshay Khot

Akshay Khot

Updated on 22-Jun-2021 14:57:48

In typical web applications, the communication flow is one-way, i.e. from client to the server. The client initiates a request to the server, the server performs some task, and sends the response to the client.SignalR is an open-source project that enables real-time, bi-directional web communication from server to clients. Using ... Read More

Explain how error handling works in ASP.NET Core

Akshay Khot

Akshay Khot

Updated on 22-Jun-2021 14:57:12

When building or using web applications, it’s very common to run into errors. Hence it’s important to configure error handling for your web application and handle the errors gracefully to provide a suitable response to the user. This improves the usability of your application as well as makes it robust.There ... Read More

Explain how static files are served in ASP.NET Core

Akshay Khot

Akshay Khot

Updated on 22-Jun-2021 14:56:23

Static files refer to content such as HTML, CSS, JavaScript, and images that are served directly to the users without any dynamic computation.In ASP.NET Core, the web root directory holds the static files. By default, it is the {content root}/wwwroot directory, but you can change it using the UseWebRoot() method.In ... Read More

What is routing? Explain how it works in ASP.NET Core

Akshay Khot

Akshay Khot

Updated on 22-Jun-2021 14:55:46

In the context of web application frameworks, routing matches an incoming HTTP request to executable code. The executable code works as an endpoint that handles the request and returns a response.ASP.NET Core defines and configures the endpoints when the application starts. Routing also handles extracting the values from the request, ... Read More

Explain how Razor Pages work in ASP.NET Core

Akshay Khot

Akshay Khot

Updated on 22-Jun-2021 14:55:10

Razor Pages simplify the traditional MVC-based programming model by adopting a file-based routing. Razor Pages focus on page-based scenarios for building web applications rather than using controllers and views like a traditional ASP.NET MVC application.Once the application receives an HTTP request, it moves through the middleware pipeline until it reaches ... Read More

What is Kestrel and how does it differ from IIS? (ASP.NET)

Akshay Khot

Akshay Khot

Updated on 22-Jun-2021 14:54:37

Kestrel is a lightweight, cross-platform, and open-source web server for ASP.NET Core. It is included and enabled by default in ASP.NET Core. Kestrel is supported on all platforms and versions supported by .NET Core.In the Program class, the ConfigureWebHostDefaults() method configures Kestrel as the web server for the ASP.NET Core ... Read More

Explain the purpose of the Startup class in ASP.NET Core

Akshay Khot

Akshay Khot

Updated on 22-Jun-2021 14:54:02

The Startup class configures your application's services and defines the middleware pipeline.Generally speaking, the Program class is where you configure your application's infrastructure, such as the HTTP server, integration with IIS, and configuration sources. In contrast, the Startup class defines which components and features your application uses and the middleware ... Read More

Advertisements