InterviewPitch

Land the job you want — prepare
with Real interviews Q&A

Curated interview questions, company-wise guides and coding rounds. Practice mock interviews, improve with feedback, and track your progress.

Q&A
Top curated interview packs
Company-wise & role-wise packs, quality assured.
Start a quiz
Instant scoring
All Interview Q&A
50 plus topics
Beginner
1. What is .NET Core?

.NET Core is a free, open-source, cross-platform framework developed by Microsoft for building modern applications.

It allows developers to create:

  • Web applications
  • Web APIs
  • Desktop apps
  • Cloud applications
  • Microservices
  • Mobile backends

Why .NET Core is Popular

  • High performance
  • Cross-platform support
  • Open-source development
  • Cloud-ready architecture
  • Easy deployment
Beginner
2. Is .NET Core cross-platform?

That means applications built with .NET Core can run on multiple operating systems, including:

  • Windows
  • Linux
  • macOS
  • Why This is Important

    Older .NET Framework mainly worked only on Windows.

    • Cloud computing
    • Docker containers
    • Linux servers
    • Modern development environments
Beginner
3. What is the difference between .NET Framework and .NET Core?

Both .NET Framework and .NET Core are development platforms created by Microsoft, but they are designed for different purposes.

Feature.NET Framework.NET Core
Platform SupportWindows OnlyWindows, Linux, macOS
Open Source✖ Partial✔ Fully Open Source
PerformanceSlowerFaster
Application TypeTraditional Desktop & Web AppsModern Cloud & Microservices Apps
Cross-Platform✖ No✔ Yes
DeploymentSystem-wide InstallationFlexible & Self-contained
Docker Support✖ Limited✔ Excellent
Microservices Support✖ Not Ideal✔ Excellent
Command Line Support✖ Limited✔ Strong CLI Support
Side-by-Side Versioning✖ Difficult✔ Supported
Best Use CaseLegacy Enterprise ApplicationsModern Scalable Applications
Current Microsoft Focus✖ Maintenance Mode✔ Actively Developed
Beginner
4. What is Kestrel?

Kestrel is a lightweight, fast, cross-platform web server used by ASP.NET Core applications.It is the default web server for ASP.NET Core.

Kestrel is the server that runs and listens for HTTP requests in ASP.NET Core applications.

When a browser requests: http://localhost:5000

Kestrel receives the request and sends back the response.

What Kestrel Does

Kestrel handles:

  • HTTP requests
  • HTTPS requests
  • WebSocket connections
  • API traffic
FeatureKestrel
TypeWeb Server
Used WithASP.NET Core
Cross-Platform✔ Yes
Default Server✔ Yes
PerformanceHigh Performance
Lightweight✔ Yes
Supports HTTPS✔ Yes
Supports WebSockets✔ Yes
Runs OnWindows, Linux, macOS
Default HTTP Port5000
Default HTTPS Port5001
Production UsageOften Used Behind IIS/Nginx
Main PurposeHandle HTTP Requests
Beginner
5. What is middleware in .NET Core?

Middleware in ASP.NET Core is software/components that handle HTTP requests and responses in the application pipeline.

Each middleware component can:

  • Process the request
  • Modify the request/response
  • Pass control to the next middleware
  • Stop the request pipeline

Middleware Pipeline

Request ↓ Authentication Middleware ↓ Authorization Middleware ↓ Routing Middleware ↓ Controller/API ↓ Response

MiddlewarePurpose
AuthenticationVerify User Identity
AuthorizationCheck User Permissions
RoutingMatch URL Routes
Static FilesServe CSS, JS, Images
CORSHandle Cross-Origin Requests
Exception HandlingCatch & Handle Errors
HTTPS RedirectionRedirect HTTP to HTTPS
SessionStore User Session Data
Response CompressionReduce Response Size
LoggingLog Request & Response Details
Cookie PolicyManage Cookie Settings
Endpoint MiddlewareExecute Matched Endpoints
Beginner
6. What is dependency injection?
Built-in feature that provides loose coupling between classNamees.
Beginner
7. What is appsettings.json?
Configuration file used to store application settings.
Beginner
8. What is routing?
Mechanism to map URLs to controllers and actions.
Beginner
9. What is IWebHost?
Interface responsible for starting and stopping the web application.
Beginner
10. What is the Program.cs file?
Entry point of a .NET Core application.
Beginner
11. What is Startup.cs?
Configures services and middleware pipeline (in older versions).
Beginner
12. What is Entity Framework Core?
Lightweight ORM for database operations in .NET Core.
Beginner
13. What is migration in EF Core?
Feature to update database schema based on model changes.
Beginner
14. What is Razor Pages?
Page-based programming model in ASP.NET Core.
Beginner
15. What is configuration provider?
Provides configuration data from JSON, environment variables, etc.
Intermediate
16. What is IServiceCollection?
Used to register application services for dependency injection.
Intermediate
17. What is IApplicationBuilder?
Used to configure middleware pipeline.
Intermediate
18. What is logging in .NET Core?
Built-in logging system for tracking application events.
Intermediate
19. What is CORS?
Cross-Origin Resource Sharing allows APIs to be accessed from different domains.
Intermediate
20. What is IActionResult?
Represents the result of an action method.
Intermediate
21. What is Model Binding?
Maps request data to action method parameters automatically.
Intermediate
22. What is Filters in .NET Core?
Code executed before or after action methods.
Intermediate
23. What is JWT authentication?
Token-based authentication mechanism for secure APIs.
Intermediate
24. What is async and await?
Used for asynchronous programming to improve performance.
Intermediate
25. What is Swagger?
Tool to document and test APIs.
Intermediate
26. What is environment in .NET Core?
Defines Development, Staging, or Production configuration.
Intermediate
27. What is app.UseRouting()?
Adds routing middleware to the pipeline.
Intermediate
28. What is app.UseEndpoints()?
Configures endpoints such as controllers.
Intermediate
29. What is repository pattern?
Abstraction layer between data access and business logic.
Intermediate
30. What is Unit Testing in .NET Core?
Testing individual components using frameworks like xUnit.
Advanced
31. What is Generic Host?
Provides hosting infrastructure for console and web apps.
Advanced
32. What is BackgroundService?
Used to run background tasks in hosted services.
Advanced
33. What is SignalR in .NET Core?
Library for real-time communication.
Advanced
34. What is minimal API?
Lightweight way to build APIs with minimal configuration.
Advanced
35. What is gRPC?
High-performance RPC framework supported in .NET Core.
Advanced
36. What is Docker support?
.NET Core apps can be containerized using Docker.
Advanced
37. What is Health Checks?
Monitors application health status.
Advanced
38. What is MemoryCache?
In-memory caching for performance improvement.
Advanced
39. What is Distributed Cache?
Cache shared across multiple servers.
Advanced
40. What is rate limiting?
Restricts number of API requests per client.
Coding Round
41. Minimal API example
Answer Here
Coding Round
42. Register service
Answer Here
Coding Round
43. Enable CORS
builder.Services.AddCors(); app.UseCors();
Coding Round
44. EF Core DbContext
Answer Here
Coding Round
45. Add migration command
dotnet ef migrations add InitialCreate
Coding Round
46. Apply migration
dotnet ef database update
Coding Round
47. Read configuration
var value = builder.Configuration["Key"];
Coding Round
48. Logging example
logger.LogInformation("Message");
Coding Round
49. JWT setup example
builder.Services.AddAuthentication().AddJwtBearer();
Coding Round
50. Async method example
Answer Here