Skip to content

Installation of Server tier

DeclanBuckley edited this page Dec 8, 2023 · 4 revisions

Home / Installation / Server Tier

The PxStat Application Server Tier Installation and set up.

Please read the Requirements first.

Download and install the .NET Framework 4.7.2 Runtime (or higher).

Download and install the URL Rewrite module for IIS.

Create a inetpub/pxstat/ws/server folder where to copy the compiled code of the Server tier.

FYI, ws stands for Web-Service.

createiis

Open Command Prompt and go to the ws folder created above.

Run the following code to create the public and private Hard Links / Directory Junctions.

mklink /j private server.

mklink /j public server.

Hard Links. A hard link is the file system representation of a file by which more than one path references a single file in the same volume. N.B. You will need to be logged into the Command Prompt as an Administrator.

hardlink

Compile the C# code according to the relevant environment (TD, UAT, Live) and publish into the server folder.

copy

Open the Server Certificates at the root level of the IIS Server.

image

Import the SSL Certificate for your domain.

image

Add the Website in IIS

N.B. Take note of the Application pool name (i.e. PxStat WS). You will need this name later when setting the permission for the Performance Monitor Users. addwebsite

Add HTTPS binding against your SSL Certificate.

binding

Convert private and public folders to Applications.

converttoapp

Open the Advanced Settings of the application pool PxStat WS and change the Maximum Worker Processes to 0.

image

Logging.

Implement this at the pxstat\ws level only.

logging

logging2

Install IIS module for Windows Authentication.

To access IIS click on your Start menu and double click on Server Manager.

start

Select Add Roles and features.

installiismodule

Click on Next to continue.

installiismodule2

Click on Next to continue.

installiismodule3

Select Windows Authentication within the security options.

. installiismodule4

Install, close and open IIS.

Select Internet Information Servies (IIS) Manager from the Tools menu on the Server Manager dashboard.

iis

Select the Authentication option for the private application.

iis2

Enable Windows Authentication.

installiismodule5

Set Extended Protection to Required and select the Enable Kernel-mode authentication.

installiismodule6

Set NTLM as the only Enabled Provider.

installiismodule7

Open the Configuration Editor at the root level of your IIS Server.

Please note these settings can be tuned according to your environment and requirements.

  • Browse to the system.web/httpRuntime section.
  • Change the setting maxRequestLength to cap any request size. maxRequestLength is expressed in KB (Kilo Bytes). If you want to upload up to 10 MB files, then you must allow some extra Bytes (i.e. 1 MB) required by the JSON-RPC request, for a total of 11 MB = 11 * 1024 = 11264 KB.
  • Change the setting executionTimeout to limit the execution time of any request.

N.B. The maxRequestLength and executionTimeout at the Server level must be equal or greater than the maxRequestLength and executionTimeout set in the Web.config of the application:

	<system.web>
		<compilation debug="true" targetFramework="4.7.2" />
		<!-- executionTimeout (Seconds), maxRequestLength (KB)  -->
		<httpRuntime executionTimeout="3600" maxRequestLength="11264" targetFramework="4.7.2"/>
	</system.web>

image

  • Browse to the system.webServer/security/requestFiltering section.
  • Change the setting requestLimits/maxAllowedContentLength to cap any request size. maxAllowedContentLength is expressed in B (Bytes). If you want to upload up to 10 MB files, then you must allow some extra Bytes (i.e. 1 MB) required by the JSON-RPC request, for a total of 11 MB = 11 * 1024 * 1024 = 11534336 Bytes.

N.B. The maxAllowedContentLength at the Server level must be equal or greater than the maxAllowedContentLength set in the Web.config of the application:

	<security>
		<requestFiltering>
			<!-- maxAllowedContentLength (B) -->
			<requestLimits maxAllowedContentLength="11534336" />
		</requestFiltering>
	</security>

image

Add the Application pool name (i.e. PxStat WS) to the Performance Monitor Users group.

  • You must browse the website at least once to initiate the relative AppPool
  • Change the Location to be the local Server.
  • Add the user by typing IIS APPPOOL\PxStat WS and click on Check Names to validate.

image

  • Open the Command Line or PowerShell as Administrator.

image

  • Run iisreset for all changes to take immediately effect.

image

Clone this wiki locally