This repository contains demos and examples of advanced concepts in ASP.NET Core Web API, including authentication, payment services, caching, logging, messaging, and more. It is designed to help developers learn and implement these features in real-world applications.
- JWT-based authentication
- Role-based and policy-based authorization
- Securing API endpoints
- Generate and validate JSON Web Tokens (JWT)
- Implement refresh tokens
- Secure API with Bearer token authentication
- Structured logging using
ILogger - Log levels: Trace, Debug, Information, Warning, Error, Critical
- Logging to Console, File, or external systems (Serilog, NLog)
- Custom middleware examples
- Exception handling middleware
- Request logging middleware
- Pipeline configuration in ASP.NET Core
- Sending emails using SMTP / MailKit
- HTML emails and attachments
- Async email sending
- URL versioning (e.g.,
/api/v1/) - Header-based versioning
- Deprecation handling
- Stripe, PayPal, Paymob, FawryPay, Etisalat Cash integrations
- Test & sandbox environments
- Webhooks and payment confirmation handling
- FCM setup and configuration
- Send notifications to Android, iOS, and Web
- Topic-based and device-based messaging
- Create indexes and store/search documents
- Query DSL examples
- Kibana dashboards for visualization
- In-memory caching
- Distributed caching with Redis
- Cache expiration strategies (Sliding, Absolute)
- Cache patterns: Cache-aside, Read-through
- Producer & Consumer examples
- Messaging patterns: Work Queues, Publish/Subscribe, Routing
- Durable queues, acknowledgements, prefetch
- Fixed window, sliding window, and token bucket
- Limit API requests per client
- Handling
429 Too Many Requestsresponses
- Clone the repository:
git clone https://github.com/yourusername/aspnetcore-advanced-demo.git