Top 5 ASP.NET Core Interview Questions


1.What is .NET Core?
Asp.NET Core is a newer version of .NET, which is cross-platform, supporting Windows, MacOS and Linux, and can be used in device, cloud, and embedded/IoT scenarios.
2.What is Kestrel ?
Kestrel is a cross-platform web server built for ASP.NET Core. . It is based on asynchronous I/O library called "libuv" primarily developed for Node.js 
It is default web server, but you still can use IIS, Apache, Nginx etc.
3. Main characterestics of ASP.NET Core?
Here are the Top 13 Asp.Net Core features
  • Cross-Platform webserver "Kestrel" & Container Support
  • Single programming model for MVC and Web API
  • Dependency Injection is heavily used in asp.net core framework, We can extend it with other popular DI containers
  • We have built-in and extensible structured logging in Asp.Net Core, also can use third party logging utility
  • "WWWROOT" folder for static files
  • fully async pipeline easily configured via middleware
  • Razor page, specially designed for small size application, supports cross platform deployment
  • Provide protection against CSRF (Cross-Site Request Forgery)
  • Support WebSocket and SignalR
  • Command-line supports to create, build, run an application
  • Tags Helpers in Asp.net Core helps in rapid Development.
  • There is no web.config, We now use appsettings.json file to store configuration information
  • There is no Global.asax, We have Startup.cs, to setup new Middleware and services for DI Container.
4. Where to keep configuration information in asp.net core.
Now there is no web.config file, in Asp.net core we have to store configuration information in asppsettings.json file, which is plain text file, keep information as key-value pair in json format . 
{
  "Logging": {
    "IncludeScopes": false,
    "LogLevel": {
      //"Default": "Warning"
      "Default": "Debug",
      "System": "Information",
      "Microsoft": "Information"
    }
  },
  "DbConnectionConfig": {
    "DatabaseName": "databaseName",
    "UserName": "username",
    "Password": "password",
    "ServerName": "IP-Address"
  }
}
5. What is Middleware in ASP.NET Core?
Middleware is software injected into the application pipeline to handle request and responses. Now we can manipulate http request and response which was not possible with earlier Asp.net Framework, Middleware are just like chained to each other and form as a pipeline. We can change the order in configuration.

Post a Comment

0 Comments