Blog

What is OAuth2 and OpenID Connect?

What is OAuth2 and OpenID Connect?

Let’s break down two buzzwords you’ve probably heard in the world of web security: OAuth 2.0 and OpenID Connect. OAuth 2.0 is like giving someone a valet key — limited access without handing over your master keys. It lets apps request permission to access your data — like your Google Drive or GitHub profile — […]

What is CORS?

What is CORS?

Ever tried to fetch data from another website in your web app — and got blocked? That’s CORS in action! CORS, or Cross-Origin Resource Sharing, is a security feature built into web browsers. It controls which websites are allowed to talk to each other. By default, a website can only request resources from the same […]

What is Data Protection API in ASP NET Core?

What is Data Protection API in ASP NET Core?

“In ASP.NET Core, the Data Protection API is like a digital safe — it protects sensitive data like authentication tokens, cookies, and user info. Instead of storing plain text, it automatically encrypts and decrypts data behind the scenes, keeping it secure even if someone gets access to the storage. It uses strong cryptographic algorithms and […]

What are Unit Tests

What are Unit Tests

“Ever wonder how developers catch bugs before they become big problems? That’s where Unit Tests come in. A unit test is a small piece of code that checks if another small piece of code — like a function or method — works the way it’s supposed to. Think of it like a mini quality check […]

What is Integration Testing

What is Integration Testing

🧠 What is Integration Testing? Integration Testing focuses on testing how different parts of a system (like services, APIs, databases, or external systems) work together. It ensures that the components function as expected when they interact. ✅ Key Points of Integration Testing: ✅ It tests the interaction between multiple components (unlike Unit Testing, which tests […]

What is .NET Core? How is it different from .NET Framework?

What is .NET Core? How is it different from .NET Framework?

Answer: .NET Core is a cross-platform, open-source framework for building modern applications. .NET Core runs on Windows, Linux, and macOS .NET Framework is Windows-only Example: I used .NET Core to build a REST API deployed on Linux using Docker.

Explain dependency injection (DI).

Explain dependency injection (DI).

A: DI supplies a class’s dependencies from the outside, improving testability and decoupling. Example: In ASP.NET Core, you register IMyService in Startup.ConfigureServices and the framework injects it into controllers.

What are delegates? C# interview Questions 40

What are delegates? C# interview Questions 40

Delegates in C# are type-safe function pointers that allow methods to be passed as parameters. They are used to define callback methods and implement event handling. Delegates can point to both static and instance methods, enabling flexibility and decoupling of methods from the objects that call them.

What are Custom Exceptions? C# interview Questions 39

What are Custom Exceptions? C# interview Questions 39

Custom exceptions in .NET are user-defined exceptions that inherit from System.Exception. They provide specific error information tailored to an application’s needs, improving code readability and error handling.