Secure Shopping Platform is an ASP.NET Core MVC web application developed to demonstrate secure coding practices in modern web applications.
The project implements authentication, role-based authorization, input validation, XSS prevention, SQL Injection prevention, password hashing, HTTPS security, and secure session handling.
- ASP.NET Core MVC
- C#
- Entity Framework Core
- In-Memory Database
- Cookie Authentication
- BCrypt Password Hashing
- HTML/CSS
- Razor Views
- User Registration
- User Login
- Secure Logout
- Cookie-Based Authentication
- Role-Based Authorization
- Admin Dashboard Access Restriction
Implemented using Data Annotations.
Entity Framework Core ORM is used instead of raw SQL queries.
User-generated content is encoded using Html.Encode().
Passwords are hashed using BCrypt.
HTTPS enabled for secure communication.
Implemented using ValidateAntiForgeryToken.
SecureShoppingPlatform
│
├── Controllers
├── Models
├── Views
├── Data
├── Program.cs
└── SecureShoppingPlatform.csprojEmail: admin@gmail.com
Password: Admin@123
Email: user@gmail.com
Password: User@123
Enter:
<script>alert('hack')</script>Expected: Script should not execute.
Enter:
' OR 1=1 --Expected: Application behaves normally without executing SQL commands.
- Open Visual Studio 2026
- Open
SecureShoppingPlatform.csproj - Build Solution
- Press
Ctrl + F5
| Feature | URL |
|---|---|
| Home | /Home/Index |
| Register | /Account/Register |
| Login | /Account/Login |
| Product List | /Product |
| Add Product | /Product/Create |
| Admin Dashboard | /Admin/Dashboard |
| Logout | /Account/Logout |
- ASP.NET Core MVC Architecture
- Secure Authentication
- Role-Based Authorization
- Secure Password Storage
- Secure Form Handling
- XSS Prevention
- SQL Injection Prevention
- HTTPS Security
- Entity Framework Core
Giridhar Gopal