Skip to main content

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

  1. Download and extract the release package
  2. Open PowerShell as Administrator
  3. Run the install script:
.\install.ps1 -StartService

Install Script Options

.\install.ps1 [-InstallPath <String>]
[-ServiceName <String>]
[-SourcePath <String>]
[-StartService]
ParameterDefaultDescription
-InstallPathC:\xView\Web\XReportsInstallation directory
-ServiceNameXReportsWindows Service name
-SourcePathScript directoryPath to published files
-StartServiceOffStart 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

ParameterDefaultDescription
-InstallPathC:\xView\Web\XReportsInstallation directory
-ServiceNameXReportsWindows Service name
-KeepFilesOffKeep files after removing service
-ForceOffSkip confirmation prompts

Examples

Standard uninstall:

.\uninstall.ps1

Keep application files:

.\uninstall.ps1 -KeepFiles

Service Configuration

The installer configures the Windows Service with:

SettingValue
Start TypeDelayed Auto-Start
1st FailureRestart after 30 seconds
2nd FailureRestart after 30 seconds
3rd FailureRestart after 60 seconds
Reset Failure CountAfter 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

  1. Press Win + R
  2. Type services.msc
  3. Find "XReports Web Service"

File Locations

ItemDefault Path
ApplicationC:\xView\Web\XReports\
ExecutableC:\xView\Web\XReports\XReports.exe
Web ContentC:\xView\Web\XReports\wwwroot\
ConfigurationC:\xView\Web\XReports\appsettings.json

Upgrading

To upgrade an existing installation:

  1. Stop the service:

    Stop-Service -Name XReports
  2. Backup configuration files if needed

  3. 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