Windows Service Diagnostics
The AmbirScan Web Connect Windows Service is the middleware that bridges browser requests to the Desktop App. It runs as a standard Windows Service, listening for HTTPS requests on localhost:53052 and forwarding commands to the Desktop App via a named pipe.
This guide covers how to diagnose issues with the service itself — connectivity, certificates, logging, and common failure modes.
Service Management
Checking Service Status
Open a Command Prompt (as Administrator) or use the Services console:
Command Prompt:
sc query "ASWCN Scanner Bridge Service"
Expected output includes STATE: 4 (RUNNING).
Services Console:
- Press Win+R, type
services.msc, press Enter - Find "AmbirScan Web Connect Service"
- Check the Status column — should show Running
Starting and Stopping
REM Start the service
net start "ASWCN Scanner Bridge Service"
REM Stop the service
net stop "ASWCN Scanner Bridge Service"
REM Restart (stop then start)
net stop "ASWCN Scanner Bridge Service" && net start "ASWCN Scanner Bridge Service"
You can also right-click the service in services.msc and choose Start, Stop, or Restart.
Startup Order
The service and Desktop App can start in either order. On startup, the service waits 2 seconds then begins checking for the Desktop App every 5 seconds. Once the Desktop App starts, the service detects it and establishes the named pipe connection automatically.
Recommended order for manual startup:
- Start the Desktop App first (
AmbirWebScan.exe) - Start the Windows Service
Diagnostic Endpoints
The service exposes several endpoints useful for diagnosing issues. You can test these from a browser or with curl. Use the -k flag with curl to skip self-signed certificate verification.
Root Endpoint
GET https://localhost:53052/
Returns basic service info. If this responds, the service is running and accepting HTTPS connections.
{
"service": "ASWCN Scanner Bridge Service",
"version": "1.0.0",
"status": "running",
"timestamp": "2026-02-26T14:30:00Z"
}
If this fails: The service is not running, the port is blocked, or the certificate is invalid.
Health Check
GET https://localhost:53052/health
Returns the health status including Desktop App connectivity:
| Status | Meaning |
|---|---|
| Healthy | Service running, Desktop App connected |
| Degraded | Service running, Desktop App not connected |
| Unhealthy | Exception occurred during health check |
Diagnostic use: Monitoring systems can poll this endpoint to detect when the Desktop App goes down.
Status Endpoint
GET https://localhost:53052/api/twain/status
Returns detailed status of the entire system:
{
"success": true,
"serviceOnline": true,
"desktopAppConnected": true,
"scannerStatus": {
"isOnline": true,
"isPaperLoaded": true,
"isSourceOpen": false,
"ocrEnabled": false
},
"timestamp": "2026-02-26T14:30:00Z"
}
Key fields to check:
desktopAppConnected— Is the pipe connection established?scannerStatus.isOnline— Is a scanner detected and powered on?scannerStatus.isPaperLoaded— Is paper in the feeder?
Scanner List
GET https://localhost:53052/api/twain/scanners
Returns all detected scanners. If this returns an empty list, the scanner may not be connected or its TWAIN driver may not be installed.
Returns HTTP 503 if the Desktop App is not connected.
End-to-End Diagnostic Sequence
Run through these checks in order to isolate where a problem lies:
| Step | Test | Pass | Fail |
|---|---|---|---|
| 1 | Is the service running? (sc query) | Continue | Start the service |
| 2 | Does https://localhost:53052/ respond? | Continue | Check certificate, port conflicts |
| 3 | Does /health return Healthy? | Continue | Desktop App not running — start it |
| 4 | Does /api/twain/scanners list scanners? | Continue | Scanner not connected or driver missing |
| 5 | Does a scan from the web app succeed? | Working | Check browser console for CORS/network errors |
Certificate Management
The service requires an HTTPS certificate to accept browser requests. A self-signed certificate is created during installation.
Checking the Certificate
- Open the Certificate Manager: press Win+R, type
certlm.msc, press Enter (requires admin) - Navigate to Personal > Certificates
- Look for a certificate with subject CN=ASWCN Scanner Bridge
- Double-click to check the Valid from and Valid to dates
The service logs the certificate thumbprint and expiry date on startup:
Certificate loaded: Thumbprint=ABC123..., Expires=2027-02-26
Certificate Expired or Missing
If the certificate is expired or missing, the service will fail to start.
To reinstall the certificate:
REM Remove old certificate (if present)
ASWCNCertManager.exe remove
REM Install new certificate (requires admin)
ASWCNCertManager.exe install
Then restart the service.