Installation
XReports can be installed as a Windows Service using PowerShell scripts.
Requirements
- Windows 10/11 or Windows Server 2016+
- .NET 10.0 Runtime (included in self-contained deployment)
- Administrator privileges
Quick Install
- Download and extract the release package
- Open PowerShell as Administrator
- Run the install script:
.\install.ps1 -StartService
Install Script Options
.\install.ps1 [-InstallPath <String>]
[-ServiceName <String>]
[-SourcePath <String>]
[-StartService]
| Parameter | Default | Description |
|---|---|---|
-InstallPath | C:\xView\Web\XReports | Installation directory |
-ServiceName | XReports | Windows Service name |
-SourcePath | Script directory | Path to published files |
-StartService | Off | Start service after install |
Examples
Default installation:
.\install.ps1
Custom install path with auto-start:
.\install.ps1 -InstallPath "D:\Services\XReports" -StartService
Uninstallation
Run as Administrator:
.\uninstall.ps1
Uninstall Options
| Parameter | Default | Description |
|---|---|---|
-InstallPath | C:\xView\Web\XReports | Installation directory |
-ServiceName | XReports | Windows Service name |
-KeepFiles | Off | Keep files after removing service |
-Force | Off | Skip confirmation prompts |
Examples
Standard uninstall:
.\uninstall.ps1
Keep application files:
.\uninstall.ps1 -KeepFiles
Service Configuration
The installer configures the Windows Service with:
| Setting | Value |
|---|---|
| Start Type | Delayed Auto-Start |
| 1st Failure | Restart after 30 seconds |
| 2nd Failure | Restart after 30 seconds |
| 3rd Failure | Restart after 60 seconds |
| Reset Failure Count | After 1 day |
Managing the Service
PowerShell Commands
# Check status
Get-Service -Name XReports
# Start service
Start-Service -Name XReports
# Stop service
Stop-Service -Name XReports
# Restart service
Restart-Service -Name XReports
Services Console
- Press
Win + R - Type
services.msc - Find "XReports Web Service"
File Locations
| Item | Default Path |
|---|---|
| Application | C:\xView\Web\XReports\ |
| Executable | C:\xView\Web\XReports\XReports.exe |
| Web Content | C:\xView\Web\XReports\wwwroot\ |
| Configuration | C:\xView\Web\XReports\appsettings.json |
Upgrading
To upgrade an existing installation:
-
Stop the service:
Stop-Service -Name XReports -
Backup configuration files if needed
-
Run the installer (it will detect and reinstall):
.\install.ps1 -StartService
Troubleshooting
Service Won't Start
Check the Windows Event Log:
Get-EventLog -LogName Application -Source XReports -Newest 10
Port Already in Use
Check which process is using the port:
netstat -ano | findstr :5000
Permission Issues
Ensure the service account has:
- Read/Write access to the installation directory
- Network access for database connections