The Needle Management System is a web-based application built using ASP.NET Core MVC and C#[cite: 7]. Designed for factory environments, it provides a comprehensive solution for tracking the complete lifecycle of sewing needles[cite: 7], replacing cumbersome manual logs with secure, role-based workflows, automated auditing, and integrated reporting[cite: 7].
1. System Architecture & Technology Stack
The application is structured around a classic 3-tier architecture separating the presentation layer, business logic, and database layer[cite: 7]:
- Frontend: Razor Views powered by Bootstrap 5, interactive JavaScript libraries like Select2 for searchable dropdowns, and Chart.js for real-time analytics[cite: 7].
- Backend: C# running on .NET 8.0 with ASP.NET Core MVC controllers managing HTTP workflows[cite: 7]. Entity Framework Core acts as the Object-Relational Mapper (ORM), while ASP.NET Core Identity governs role-based security[cite: 7].
- Database: Microsoft SQL Server managing relational records for users, machines, inventory levels, and transaction states[cite: 7].
2. Core Features & Workflow Logic
The system introduces robust operational controls tailored for manufacturing facilities:
- Role-Based Access Control (RBAC): Granular permissions assigned across Super Admin, Admin, Manager, Operator, Stores, and Observer roles[cite: 7].
- Two-Tier Inventory Tracking: Simultaneously monitors central stores inventory and individual operators' personal hand stock[cite: 7].
- State-Based Request Workflow: Tracks needle requests seamlessly through
PendingApproval,Approved, andIssuedstates[cite: 7]. - Webcam Integration: Allows operators to capture and upload images of broken or blunt needles directly in-browser during request submission[cite: 7].
- Reporting Tools: Integrates Rotativa for generating official downloadable audit PDFs[cite: 7] alongside Chart.js transaction dashboards[cite: 7].
3. Enterprise IIS Deployment Guide
Deploying the application to an internal Windows Server requires precise configuration of Internet Information Services (IIS) and the .NET runtime:
- Server Preparation: Enable IIS features including management tools, install the ASP.NET Core 8.0 Hosting Bundle, and perform an
iisreset[cite: 7]. - Database Setup: Configure MS SQL Server for Mixed Mode authentication with TCP/IP protocols enabled[cite: 7]. Grant
db_ownerprivileges to the application user account[cite: 7]. - Publishing & IIS Binding: Publish the project in Release mode from Visual Studio 2022, copy files to
C:\inetpub\wwwroot\NeedleSystem, create a new IIS site, and configure its Application Pool to run with "No Managed Code"[cite: 7].
4. Securing Internal Traffic with HTTPS
To secure communications on a local network, generate a self-signed certificate using PowerShell on the server[cite: 7]:
Export the certificate without the private key, distribute it to client machines, and install it into the Trusted Root Certification Authorities store so users can access the system securely over port 443[cite: 7].
About the Author
Nirmal Himansha is an IT Administrator and developer specializing in enterprise web applications, Microsoft SQL database infrastructure, and internal server automation.