HostService Settings
Starting with appRulesPortal v9.0 (.NET 8 / Wisej 4), the former appRules.HostService.exe has been replaced by the appRulesPortal kernel engine — a self-hosted Kestrel Windows Service that runs natively without IIS.
The portal now runs as four coordinated Windows Services that must all be installed and started together.
Note: IIS is not required. See IIS Settings if you want to put IIS in front of Kestrel as a reverse proxy for SSL termination or port 80/443 routing.
Prerequisites
OS
Windows Server 2019 / 2022 and higher
.NET 8 Runtime
ASP.NET Core Runtime 8.x — Download
Garnet/Redis
Required by appRules.CachingService
SQL Server
Required for the appRules metadata database
The Four Services
appRulesPortal.exe
appRules Portal
Kestrel web host — serves the Wisej application
appRules.CachingService.exe
appRules Caching Service
Redis-backed session and data cache
appRules.WebApiService.exe
appRules WebApi Service
REST API layer
appRules.SchedulerService.exe
appRules Scheduler Service
Background job scheduler
All four executables are located in the bin\ subfolder of the install directory (e.g. [InstallationPath]\bin\).
where [InstallationPath]= appRulesPortal Folder Path
Command-Line Arguments
appRulesPortal.exe
The portal executable uses standard ASP.NET Core hosting arguments:
--urls http://0.0.0.0:{port}
Sets the listening URL and port. Default port is 8080. Use 0.0.0.0 to accept all connections, or localhost to accept local connections only.
--environment Production
Sets the runtime environment. Equivalent to ASPNETCORE_ENVIRONMENT=Production.
Example — listen on all interfaces, port 8080:
Example — local connections only, custom port:
The companion services (
CachingService,WebApiService,SchedulerService) take no command-line arguments. All their configuration is viaappsettings.json/appRules.WebApiService.appsettings.json.
Service Registration
Automated
Use the provided PowerShell deployment script to install, configure, and start all four services in one step:
The script registers all services, sets ASPNETCORE_ENVIRONMENT=Production, and starts them in the correct order.
Manual
Register each service using sc.exe. All executables must use their full path:
Set ASPNETCORE_ENVIRONMENT=Production for each service via the registry:
Starting and stopping
Services must be started in order — the portal depends on the three companion services being ready:
Uninstalling
Configuration Files
appsettings.json
[InstallationPath]\
ASP.NET Core connection strings and settings
appsettings.Production.json
[InstallationPath]\
Production overrides (merged at runtime)
appRules.WebApiService.appsettings.json
bin\
WebApi service endpoint configuration
Default.json
[InstallationPath]\
Wisej license key, default theme, startup class
Minimum appsettings.json:
Minimum Default.json settings to verify:
Wisej.LicenseKey— production license keyWisej.DefaultTheme— e.g.Bootstrap-4startup— must be"appStrategy.appRulesPortal.Program.WisejInit, appRulesPortal"
Changing the Port
Pass a different --urls argument when registering the service:
To change the port on an already-registered service, delete and re-create it, or use sc.exe config:
Post-Installation Verification
All services running
sc.exe query appRulesPortal — should show RUNNING
Portal accessible
Browse to http://server:8080/ — should show login page
WebSocket active
Browser DevTools → Network → WS: 101 Switching Protocols
deps.json patched
findstr "runtimes/win" bin\*.deps.json returns nothing
JSON files blocked
GET /appsettings.json returns HTTP 403
License active
No Wisej license warning banner
Troubleshooting
Service starts then immediately stops
Startup exception
Check Windows Event Log: eventvwr.msc → Windows Logs → Application
FileNotFoundException: System.ServiceProcess.ServiceController
deps.json not patched
See WindowsService-DepsJson-Patching.md
PlatformNotSupportedException
Portable DLL build in bin\ instead of Windows-specific build
Copy from NuGet cache runtimes\win\lib\net8.0\ — see deployment guide
Portal not accessible on port 8080
Firewall blocking port
netsh advfirewall firewall add rule name="appRules" dir=in action=allow protocol=TCP localport=8080
JS / static assets not loading
staticwebassets.runtime.json ContentRoots path wrong
Patch the bin\ file manually to the correct install path
Access Denied on start
Service account lacks folder permissions
Grant the service account (e.g. LocalSystem) read/write access to [InstallationPath]\
Last updated