Committed as-is on 2026-08-26 while retiring this repo, so the working tree that existed at reformat time is preserved in history rather than only in the NAS backup.
18 KiB
Shopfloor Dashboard - IIS Express Deployment (Classic ASP)
Complete guide for deploying the Shopfloor Dashboard on your existing Windows IIS Express test environment alongside shopdb.
Overview
This deployment uses:
- Classic ASP for the API (no Python/Flask needed)
- IIS Express (already running for shopdb)
- Same MySQL 5.6 database as shopdb
- Same Z: drive file share
- Same Task Scheduler auto-start
Architecture
[Browser] → [IIS Express :8081] → [Classic ASP API] → [MySQL 5.6]
:8080 → [shopdb]
Both sites run on the same IIS Express instance, just different ports.
Prerequisites
✅ Already configured (from shopdb setup):
- Windows 11 VM running
- IIS Express installed
- MySQL ODBC 8.0 Driver installed
- Z: drive mapped to
\\192.168.122.1\windows-projects - Task Scheduler auto-starting IIS Express
- MySQL 5.6 accessible at 192.168.122.1:3306
Step 1: Copy Files to Z: Drive
The files are already in the Linux filesystem and will appear in Windows automatically via the Samba share.
Verify in Windows:
- Open File Explorer
- Navigate to
Z:\shopfloor-dashboard\ - You should see:
public\folder (index.html, logo, etc.)api_notifications_safe.asp(Classic ASP API)- This deployment guide
Files are located at:
- Linux path:
~/projects/windows/shopfloor-dashboard/ - Windows path:
Z:\shopfloor-dashboard\
Step 2: Update index.html to Use Classic ASP
The index.html currently points to /api/notifications which would try to use Flask. We need to change it to use the Classic ASP endpoint.
In Linux, edit: /home/camp/projects/windows/shopfloor-dashboard/public/index.html
Find this line (around line 270):
fetch('/api/notifications')
Change it to:
fetch('/api_notifications_safe.asp')
The file will automatically sync to Windows via the Z: drive.
Step 3: Configure IIS Express for Second Site
3.1 Locate applicationhost.config
IIS Express configuration is in your user directory:
C:\Users\<YourUsername>\Documents\IISExpress\config\applicationhost.config
Or it might be in:
C:\Users\<YourUsername>\.vs\config\applicationhost.config
Find the file using PowerShell:
Get-ChildItem -Path C:\Users\$env:USERNAME -Recurse -Filter "applicationhost.config" -ErrorAction SilentlyContinue | Select-Object FullName
3.2 Backup Current Configuration
Before making changes:
Copy-Item "C:\Users\<YourUsername>\Documents\IISExpress\config\applicationhost.config" "C:\Users\<YourUsername>\Documents\IISExpress\config\applicationhost.config.backup"
3.3 Add Shopfloor Dashboard Site
Open applicationhost.config in Notepad (as Administrator).
Find this section:
<sites>
<site name="shopdb" id="1">
<application path="/">
<virtualDirectory path="/" physicalPath="Z:\shopdb" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:8080:*" />
</bindings>
</site>
Add the new site right after the closing </site> tag:
<site name="shopfloor-dashboard" id="2">
<application path="/">
<virtualDirectory path="/" physicalPath="Z:\shopfloor-dashboard" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:8081:*" />
</bindings>
</site>
</sites>
Complete example:
<sites>
<site name="shopdb" id="1">
<application path="/">
<virtualDirectory path="/" physicalPath="Z:\shopdb" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:8080:*" />
</bindings>
</site>
<site name="shopfloor-dashboard" id="2">
<application path="/">
<virtualDirectory path="/" physicalPath="Z:\shopfloor-dashboard" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:8081:*" />
</bindings>
</site>
</sites>
Save and close the file.
Step 4: Configure Firewall for Port 8081
In PowerShell (as Administrator):
# Allow port 8081 inbound
New-NetFirewallRule -DisplayName "IIS Express - Shopfloor Dashboard" -Direction Inbound -LocalPort 8081 -Protocol TCP -Action Allow
Step 5: Configure URL ACL for Port 8081
In Command Prompt (as Administrator):
netsh http add urlacl url=http://*:8081/ user="Everyone"
You should see:
URL reservation successfully added
Step 6: Update Task Scheduler Startup Script
We need to modify the startup script to start IIS Express with both sites.
Option A: Start Both Sites Individually (Recommended)
In Linux, update: ~/projects/windows/start-iis-shopdb.bat
Change from:
@echo off
cd "C:\Program Files\IIS Express"
start "" iisexpress.exe /site:shopdb
exit
To:
@echo off
cd "C:\Program Files\IIS Express"
start "" iisexpress.exe /site:shopdb
start "" iisexpress.exe /site:shopfloor-dashboard
exit
Or create a separate script for clarity:
Create ~/projects/windows/start-iis-both.bat:
@echo off
echo Starting IIS Express for shopdb and shopfloor-dashboard...
cd "C:\Program Files\IIS Express"
start "" iisexpress.exe /site:shopdb
timeout /t 2 /nobreak >nul
start "" iisexpress.exe /site:shopfloor-dashboard
echo Both sites started!
exit
Create ~/projects/windows/start-iis-both.vbs:
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "Z:\start-iis-both.bat", 0, False
Set WshShell = Nothing
Option B: Start Without Site Name (Starts All Sites)
@echo off
cd "C:\Program Files\IIS Express"
start "" iisexpress.exe
exit
This will start ALL sites in applicationhost.config automatically.
Step 7: Update Task Scheduler Task
In Windows:
- Open Task Scheduler
- Find the task:
Start IIS Express - shopdb - Right-click → Properties
- Go to Actions tab
- Edit the action:
- Program/script:
wscript.exe - Add arguments: Change to
Z:\start-iis-both.vbs(if using Option A)
- Program/script:
- Click OK to save
Or create a new separate task:
- Click Create Task
- General Tab:
- Name:
Start IIS Express - Both Sites - Description:
Auto-start IIS Express for shopdb and shopfloor-dashboard - ✅ Run with highest privileges
- ✅ Run whether user is logged on or not
- Name:
- Triggers Tab:
- New → At startup → Delay 30 seconds
- Actions Tab:
- New → Start a program →
wscript.exe→ Arguments:Z:\start-iis-both.vbs
- New → Start a program →
- Conditions Tab:
- ❌ Uncheck "Start only if on AC power"
- Settings Tab:
- ✅ Allow task to be run on demand
- Click OK and enter password
Step 8: Test the Deployment
8.1 Test Manually First
In Windows PowerShell:
cd "C:\Program Files\IIS Express"
# Start shopdb
.\iisexpress.exe /site:shopdb
# In a new PowerShell window:
.\iisexpress.exe /site:shopfloor-dashboard
8.2 Test from Windows Browser
Open browser to:
- shopdb: http://localhost:8080
- Shopfloor Dashboard: http://localhost:8081
You should see:
- ✅ shopdb application running on port 8080
- ✅ Shopfloor Dashboard running on port 8081
- ✅ Dashboard shows GE Aerospace logo and clock
- ✅ Current and upcoming events load from database
8.3 Test Classic ASP API Directly
# Test the API endpoint
Invoke-WebRequest -Uri "http://localhost:8081/api_notifications_safe.asp" | Select-Object -ExpandProperty Content
Should return JSON with success:true and notification data.
8.4 Test from Linux
# Test shopdb
curl -s http://192.168.122.151:8080 | head -20
# Test shopfloor dashboard
curl -s http://192.168.122.151:8081
# Test API
curl -s http://192.168.122.151:8081/api_notifications_safe.asp | python3 -m json.tool
8.5 Test Task Scheduler
- In Task Scheduler, find your task
- Right-click → Run
- Wait 5 seconds
- Check Task Manager - you should see two
iisexpress.exeprocesses - Test both URLs in browser
8.6 Test Auto-Start on Boot
- Restart Windows VM
- Wait 30-40 seconds after login
- Open browser to both URLs
- Both sites should be running automatically
Step 9: Configure Database Connection
The Classic ASP file api_notifications_safe.asp is already configured to connect to the shopdb database using the same credentials as shopdb.
Current configuration in the ASP file:
Function GetDBConnection()
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "DRIVER={MySQL ODBC 5.3 Unicode Driver};" & _
"SERVER=192.168.122.1;" & _
"PORT=3306;" & _
"DATABASE=shopdb;" & _
"UID=570005354;" & _
"PWD=570005354;" & _
"OPTION=3;"
objConn.Open
Set GetDBConnection = objConn
End Function
This uses:
- Host: 192.168.122.1 (Linux host from Windows VM)
- Port: 3306
- Database: shopdb
- User: 570005354
- Password: 570005354
- Driver: MySQL ODBC 5.3 Unicode Driver (or 8.0 if installed)
If you need to change credentials: Edit /home/camp/projects/windows/shopfloor-dashboard/api_notifications_safe.asp lines 32-38.
Troubleshooting
Issue 1: Port 8081 Already in Use
Check what's using the port:
netstat -ano | findstr :8081
Kill the process:
Stop-Process -Id <PID> -Force
Issue 2: Can't Access from Linux
Check Windows Firewall:
Get-NetFirewallRule -DisplayName "*Shopfloor*"
If not found, add rule:
New-NetFirewallRule -DisplayName "IIS Express - Shopfloor Dashboard" -Direction Inbound -LocalPort 8081 -Protocol TCP -Action Allow
Issue 3: Classic ASP Returns 500 Error
Enable detailed ASP errors:
Edit applicationhost.config, find:
<asp scriptErrorSentToBrowser="false" />
Change to:
<asp scriptErrorSentToBrowser="true" />
Restart IIS Express and reload the page to see detailed error messages.
Common causes:
- MySQL ODBC driver name incorrect (check "MySQL ODBC 5.3 Unicode Driver" vs "MySQL ODBC 8.0 Driver")
- Database credentials wrong
- MySQL server not accessible from Windows
- Missing MySQL ODBC driver
Issue 4: Database Connection Fails
Test MySQL connectivity from Windows:
Test-NetConnection -ComputerName 192.168.122.1 -Port 3306
Should show: TcpTestSucceeded : True
Test ODBC connection:
- Open ODBC Data Sources (64-bit) from Control Panel
- Click Add
- Select MySQL ODBC 8.0 Unicode Driver
- Test connection with:
- Server: 192.168.122.1
- Port: 3306
- Database: shopdb
- User: 570005354
- Password: 570005354
Issue 5: Two IIS Express Processes Won't Start
Possible causes:
- Not enough delay between starting sites
- URL ACL not configured for port 8081
- applicationhost.config syntax error
Fix:
- Stop all IIS Express:
Stop-Process -Name iisexpress -Force - Verify applicationhost.config XML is valid
- Test starting sites manually one at a time
- Increase timeout in batch file to 5 seconds:
timeout /t 5 /nobreak >nul
Issue 6: Z: Drive Not Accessible at Startup
Check drive mapping:
net use
Should show: Z: \\192.168.122.1\windows-projects
If missing, remap:
net use Z: \\192.168.122.1\windows-projects /persistent:yes
Increase Task Scheduler delay:
- Edit task → Triggers → Change delay from 30 seconds to 45 or 60 seconds
URLs and Access
From Windows:
- shopdb: http://localhost:8080
- Shopfloor Dashboard: http://localhost:8081
- API Endpoint: http://localhost:8081/api_notifications_safe.asp
From Linux Host:
- shopdb: http://192.168.122.151:8080
- Shopfloor Dashboard: http://192.168.122.151:8081
- API Endpoint: http://192.168.122.151:8081/api_notifications_safe.asp
From Network (if Windows VM has network access):
- Use Windows VM IP address instead of 192.168.122.151
Maintenance Commands
Start IIS Express Manually
cd "C:\Program Files\IIS Express"
# Start both sites
.\iisexpress.exe /site:shopdb
.\iisexpress.exe /site:shopfloor-dashboard
# Or start without site name (starts all)
.\iisexpress.exe
Stop IIS Express
# Stop all IIS Express processes
Stop-Process -Name iisexpress -Force
# Or in Task Manager:
# Find "IIS Express" → Right-click → End Task
View Running Sites
Get-Process iisexpress | Format-Table Id, ProcessName, StartTime, @{Name="CommandLine";Expression={(Get-CimInstance Win32_Process -Filter "ProcessId = $($_.Id)").CommandLine}}
Check Ports in Use
netstat -ano | findstr "8080 8081"
View Task Scheduler Tasks
Get-ScheduledTask | Where-Object {$_.TaskName -like "*IIS*"}
File Structure
Z:\shopfloor-dashboard\
├── public\
│ ├── index.html # Main dashboard UI
│ ├── ge-logo-small.png # Logo
│ └── (other static files)
├── api_notifications_safe.asp # Classic ASP API (parameterized queries)
├── api_notifications.asp # Classic ASP API (basic version)
├── app.py # Flask version (not used on Windows)
├── requirements.txt # Python dependencies (not used on Windows)
├── DEPLOYMENT_IIS_ASP.md # This file
├── DEPLOYMENT_IIS_PROXY.md # Flask deployment guide
└── README.md # General readme
Z:\
├── start-iis-shopdb.bat # Original startup script
├── start-iis-shopdb.vbs # Original VBScript wrapper
├── start-iis-both.bat # New script for both sites
└── start-iis-both.vbs # New VBScript wrapper for both sites
Performance Notes
Resource Usage
Running two sites in IIS Express uses minimal resources:
- Memory: ~50 MB per site (~100 MB total)
- CPU: <1% idle, 2-5% when serving requests
Optimization
For production TV display:
- Dashboard auto-refreshes every 30 seconds
- API query is optimized (72-hour window only)
- Static files cached by browser
- No external dependencies
Security Considerations
This is a DEVELOPMENT environment with:
- No authentication on dashboard
- Simple database credentials
- Open network access within VM network
For Production Deployment:
- Use stronger database passwords
- Implement Windows Authentication
- Configure SSL/HTTPS
- Restrict firewall access
- Use read-only database user for dashboard
- Review and sanitize all inputs
Success Checklist
After deployment, verify:
- ✅ shopdb accessible at http://localhost:8080 or http://192.168.122.151:8080
- ✅ Shopfloor Dashboard accessible at http://localhost:8081 or http://192.168.122.151:8081
- ✅ Dashboard displays GE Aerospace logo
- ✅ Clock updates every second
- ✅ Current events section populated from database
- ✅ Upcoming events section populated from database
- ✅ API returns valid JSON at
/api_notifications_safe.asp - ✅ Two
iisexpress.exeprocesses running in Task Manager - ✅ Both sites start automatically after Windows restart
- ✅ No console windows appear (using .vbs wrapper)
- ✅ Accessible from Linux host
Comparison: Flask vs Classic ASP
| Feature | Flask (Python) | Classic ASP (VBScript) |
|---|---|---|
| Language | Python | VBScript |
| Performance | Faster | Adequate |
| Setup Complexity | High (Python, NSSM, reverse proxy) | Low (already configured) |
| Dependencies | Requires Python, pip packages | None (built into Windows) |
| Auto-start | Requires NSSM service or Task Scheduler | Built into existing IIS Express |
| Maintenance | More modern, easier to update | Older tech, harder to find resources |
| SQL Injection Protection | Built-in (parameterized queries) | Manual (using ADODB.Command) |
| JSON Handling | Native | Manual string building |
| Recommendation | Production with dedicated Python environment | Development/Test environment |
For this test environment: Classic ASP is the better choice since IIS Express and ODBC are already configured.
Next Steps
- Test the deployment following Step 8
- Verify auto-start by restarting Windows VM
- Add test notifications to database to see on dashboard
- Configure for production if deploying to actual production server
- Set up monitoring to ensure uptime
Support
Files and Documentation:
- This guide:
Z:\shopfloor-dashboard\DEPLOYMENT_IIS_ASP.md - IIS Express guide:
Z:\IIS-AUTOSTART-SETUP.md - ASP Development guide:
Z:\shopdb\docs\ASP_DEVELOPMENT_GUIDE.md - Shopdb docs:
Z:\shopdb\docs\README.md
Test Environment:
- Windows VM: http://192.168.122.151
- MySQL: 192.168.122.1:3306
- Database: shopdb
- User: 570005354
Common Tasks:
# View IIS Express processes
Get-Process iisexpress
# Stop all IIS Express
Stop-Process -Name iisexpress -Force
# Test database
Invoke-WebRequest http://localhost:8081/api_notifications_safe.asp
# Check firewall
Get-NetFirewallRule -DisplayName "*Shopfloor*"
# Check Task Scheduler
Get-ScheduledTask | Where-Object {$_.TaskName -like "*IIS*"}
Last Updated: October 24, 2025 Version: 1.0.0 Environment: Windows 11 VM with IIS Express + Classic ASP