Installing ScriptX.Services for Windows PC
ScriptX.Services for Windows PC requires
- Microsoft Windows Windows 10 (1803) or later on an Intel x64 PC.
ScriptX.Services for Windows PC components:
-
A self host web application server that provides the REST API to be called by clients to perform printing. The application is self configuring with the printers available to the PC and is implemented with .NET Core 5 as a self-contained application.
Please note versions before 2.12 and earlier require .NET Framework 4.6 or later.
-
The ScriptX Print Server - a COM based server (MeadCo ScriptX Broker/Host) that provides the pagination and printing facilities that is called by the REST API.
-
Orchestrator. This component is optional but required/highly recommended if there may be multiple users concurrently signed in to Windows.
Installation and use
A single installer is available that will install both web server and print service and a default configuration that is suitable for most use-cases.
The default configuration has these key aspects:
-
The server listens on
http://127.0.0.1:41191
. -
https: is supported if a certificate for localhost is available.
Using Google Chrome 70, Edge 42 or later?
Google Chrome 70 and Edge 42 and later on Windows 10 do not block communication between a secure internet site and an "insecure" server hosting on the local loopback address
127.0.0.1
(Firefox has now also stopped blocking communication). Because of this a certificate enabling https: is not necessarily required.Other/older browsers may block communication and so a certificate for localhost will be required when printing of content originating from a secure site.
The default configuration can be customised on a per-user basis.
-
Download the latest version (2.16.0.38) of ScriptX.Services for Windows PC:
-
Run the downloaded installer.
In order for the installers to run, you must be logged on to your computer as an Administrator.
ScriptX.Services for Windows PC is now available to any browser at any time.
Using Microsoft Edge or Google Chrome 92 or later?
Microsoft Edge and Google Chrome 92 and later on Windows 10 may by default block communication between an insecure origin site and server hosting on the local loopback address
127.0.0.1
.Because of this origin sites using ScriptX.Services for Windows PC to provide printing must be secure unless the feature is disabled (see //flags and search for "Block insecure private network requests").
Other/older browsers do not block communication.
Customising the configuration if required
As installled:
-
The server listens on
http://127.0.0.1:41191
. - https: is supported if a certificate for localhost is available; the server listens on the next port.
- Does not perform any diagnostic logging.
To view the configration in use navigate to the server dashboard (this link assumes the default port works).
Each of these aspects can be changed by defining configuration values in the appsettings.json
file.
This file should be created in the user's local application data folder: C:\Users\[UserName]\AppData\Local\MeadCo\ScriptXServices
An empty appsettings.json
file is simply this:
{ }
To configure the server, add sections as described below to between these top level braces {}, for example:
{ "ServerHost": { "Endpoints": { "Http": { "Port": "45678" } } } }
Standard Port Configuration
To configure the port used, create an appsettings.json
file similar to this:
"ServerHost": { "Endpoints": { "Http": { "Port": "45678" } } }
The value given to "Port" can be any value that is free on your systems.
From v2.15 onwards if the configured port is in use then the next avaiulable free port will be used and the used port written to the appsettings.json
file.
Support for https:
To support https a server certificate for localhost must be installed and recognised as valid by the browsers that are to be used. Such a certificate may already be installed, in which case it will be used.
If there is a port clash for https, then configure the port to be used by create an appsettings.json
file similar to this:
"ServerHost": { "Endpoints": { "Http": { "Port": "45678" }, "Https": { "Port": "45679", "Certificate": { "Source": "localhost", } } } }
Enable logging assistance
Logging is available and configured in the same way as for all .NET Core applications with a section similar to this:
"Logging": { "LogLevel": { "Default": "Debug", "System": "Information", "Microsoft": "Information" }, "File": { "Name": "service.log" } }
ScriptX.Services for Windows PC enables logging to the Debug output stream. If you wish to log to a file, add a "File" section as shown above.
The file will be created in the folder:C:\Users\[UserName]\AppData\Local\MeadCo\ScriptXServices
.
For v2.15.5 and later log files are written to
Test printing
See:
How to configure samples for use with ScriptX.Services for Windows PC.
Deployment of the evaluation license for your own testing and evaluation.