Skip to main content

Posts

What is JWT Authentication | How to apply in API in .NET Core

 This tutorial assumes you’re building an MVC app that also exposes APIs or wants token-based login. 🔹 Step 1: Create ASP.NET Core MVC Project dotnet new mvc -n JwtAuthDemo cd JwtAuthDemo 🔹 Step 2: Install Required NuGet Packages dotnet add package Microsoft.AspNetCore.Authentication.JwtBearer dotnet add package System.IdentityModel.Tokens.Jwt 🔹 Step 3: Add JWT Settings in appsettings.json { "Jwt" : { "Key" : "ThisIsMySecretKeyForJwt123!" , "Issuer" : "https://yourdomain.com" , "Audience" : "https://yourdomain.com" , "ExpireMinutes" : 30 } , "Logging" : { "LogLevel" : { "Default" : "Information" } } , "AllowedHosts" : "*" } ⚠️ Use a long, secure key (store it in User Secrets or Azure Key Vault in production). 🔹 Step 4: Configure JWT in Program.cs using Microsoft.A...

Creating Lightning Pages in Salesforce

  🚀 Complete Tutorial: Creating Lightning Pages in Salesforce 🔹 1. What are Lightning Pages? Lightning Pages are customized layouts in the Lightning App Builder where you can drag-and-drop components (standard, custom, or AppExchange) to design record pages, home pages, and app pages. Think of it like page builder for Salesforce — no code needed, just drag-and-drop. 🔹 2. Types of Lightning Pages App Page → A one-page app with custom dashboards, lists, or reports. Home Page → Custom homepage for different profiles. Record Page → Customized layout for a specific object (e.g., Account, Contact, or a custom object). 🔹 3. Step-by-Step: Create a Lightning Page Step 1: Open Lightning App Builder In Salesforce, click the ⚙️ Gear Icon (top right). Select Setup . In Quick Find, type App Builder . Click Lightning App Builder . Step 2: Create a New Lightning Page Click New . Choose the page type: App Page (dashboard-like view) Home Pa...

What is Kubernetes | Explain Kubernetes in depth

  1. What is Kubernetes? (K8s) Definition: Kubernetes (often written as K8s ) is an open-source container orchestration platform . It automates the deployment, scaling, and management of containerized applications. Why we need it: If you run just 1 container, Docker is enough. But in real projects, we run tens or hundreds of containers across multiple servers. Problems arise: How to restart a failed container automatically? How to scale containers up/down? How to update apps without downtime? How to expose services to the outside world? Kubernetes solves all of these by acting like a “container manager” for the whole cluster. Key features: Container Scheduling → Decides on which node a container should run. Self-healing → Restarts failed containers automatically. Scaling → Increases or decreases the number of containers based on demand. Rolling Updates & Rollbacks → Updates apps without downtime. Service Discovery & Load Ba...

What is Docker?

What is Docker?  Docker is a platform that lets you package your applications and all their dependencies into a single  container so they run consistently across different environments. it provide better approach to create and manage build to any platform Think of it like this: Without Docker: "It works on my machine" problem happens because environments differ. With Docker: You send the same container image that runs exactly the same everywhere — laptop, server, or cloud. Key points: Image = Blueprint/template of your app. Container = Running instance of that image. Dockerfile = Script with instructions to build an image. Registry – Storage for images (Docker Hub, AWS ECR, Azure ACR) Volume – Persistent storage for containers Network – Communication between containers 2. Install Docker on Windows Check your Windows Version Docker Desktop works best on Windows 10/11 Pro/Enterprise (with WSL2). If you have Windows Home , it also works...

What is Maven | How to create MAVEN Environment in details

 What is Maven? Apache Maven is a build automation and project management tool primarily used for Java projects . It is based on a Project Object Model (POM) file ( pom.xml ) which defines a project’s structure, dependencies, plugins, and build lifecycle. 📂 POM (Project Object Model) The heart of Maven is the pom.xml file which defines: Project metadata (name, version, etc.) Dependencies Plugins Build instructions Example of pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0"          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0                               http://maven.apache.org/xsd/maven-4.0.0.xsd">     <modelVersion>4.0.0</modelVersion>     <groupId>com.example</groupId>     <artifactId>my...

WEB API in ASP.NET CORE MVC | EXPLAIN WEB API IN DEPTH by Shiva Sir

1️⃣ What is Web API? 🔹 Definition: A Web API (Web Application Programming Interface) is a set of HTTP endpoints exposed by a server application that allows other applications (frontend, mobile, etc.) to communicate over the web . In .NET Core, a Web API is a type of controller that returns data (usually JSON), not views (HTML). 2️⃣ Why Use Web API? Purpose Description 🔄 Communication Enables frontend and backend apps to communicate using HTTP ⚙️ Reusability Backend APIs can be used by web apps, mobile apps, desktop apps 🔐 Centralized Business Logic All logic is managed on the server side 🚀 Lightweight & Fast Returns raw data (JSON), which is faster than rendering views 3️⃣ Web API vs MVC Feature MVC Web API Output Returns Views (HTML) Returns Data (JSON/XML) Use Case Web applications (UI required) APIs for mobile, SPA, external systems Controller Type Controller ApiController Return Type IActionResult with View ActionResult<T> with data 4️⃣ Architecture of...