Web.config file

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search

QPR ProcessAnalyzer Server's web.config file is located in the folder containing the IIS web application files for QPR ProcessAnalyzer. As the web.config is an XML document, the following characters need to be escaped with following sequences to have a well-formed XML (https://stackoverflow.com/questions/1091945/what-characters-do-i-need-to-escape-in-xml-documents):

  • " ➜ "
  • ' ➜ '
  • < ➜ &lt;
  • > ➜ &gt;
  • & ➜ &amp;

Note that the application pool identity have access rights for relevant folders and files defined in LogFilePath and LicenseFilePath.

Common Settings

These settings are in the Qpr.ProcessAnalyzer.Common.Properties.Settings section.

Parameter name Description
LogFilePath Location of the QPR ProcessAnalyzer Server log file (defined as the full path with the file name). For example: C:\ProgramData\QPR Software\QPR ProcessAnalyzer\Logs\PA.log.
DropUnusedFiltersAfter

Duration after which filters that have not been used, are dropped from the memory. Defined in format HH:mm:ss or d.HH:mm:ss, for example 01:00:00 (one hour), 00:30:00 (30 minutes) or 1.00:00:00 (24 hours). When an analysis is requested for a filter, the filter's last used time is updated (also model's last used time is updated).

This setting can be overridden for each model in the model settings.

If this setting is not defined in the web.config, a default value of 1 hour is used.

ResponsePollingInterval Determines after which time (in milliseconds) a pending requests in QPR ProcessAnalyzer Server are returned back with an exception containing an operation id. The request continues to run in the QPR ProcessAnalyzer Server, and QPR ProcessAnalyzer ScriptLauncher is then able to make a further request to query the progress of the task. Note that the Web UI doesn't support this behavior, so set the limit large enough so that it's not reached in normal usage, e.g. 10 minutes (600000 ms).
EnableProcessPerformanceCounter When set to True, the process performance counters are enabled for QPR ProcessAnalyzer. The counters can be read using the PerformanceCounterCpu and PerformanceCounterMemory properties in the expression language. When set to False, the process performance counters are disabled and cannot be read. When the process performance counters are enabled, there is a slight decrease in performance, so enable the performance counters only when needed, e.g., for monitoring and debugging purposes.
UpdateDatabaseIfNeeded Whether to update the QPR ProcessAnalyzer database when a newer version is started with an older version of the database. Either True or False.
ParallelTaskSize

The numeric value is the parallel task size. If this setting is not provided, value 100 000 is used.

EnableImportCompressionByDefault Whether to compress data transferred between client and server. Set it to True (there shouldn't be a need to set set to False).
AllowForwardingNetworkCredentials Defines whether it's allowed run the --#CallWebService command with DefaultNetworkCredentials=true when running query in the server side (i.e., ExecuteInClientSide=false).

Service Settings

These settings are in the Qpr.ProcessAnalyzer.Service.Properties.Settings section.

Parameter name Description
UseXForwardedForAsClientIp

If QPR ProcessAnalyzer Server is running behind a web traffic load balancer (e.g. in Amazon Web Services), the following setting needs to be set to True. In that case, the client ip address is fetched from http request X-Forwarded-For (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For) field instead of the source of the ip packet. Client ip address is needed for logging and as a security confirmation in addition to the session id. When there is no load balancer and thus X-Forwarded-For is not set, it's important to have this setting as False.

ProductActivationCode

QPR ProcessAnalyzer Server product license activation code. Ask your organization license activation code from customercare@qpr.com.

QPR ProcessAnalyzer Server automatically activates itself if the code is specified and there is an internet connection in the server computer. If there is no internet access, the activation need to be done manually by using the Activation Utility.

FirstName (mandatory) Contact person's first name (in the user organization) (used for QPR ProcessAnalyzer Server activation).
LastName (mandatory) Contact person's last name (used for QPR ProcessAnalyzer Server activation).
Country (optional) User organization country (used for QPR ProcessAnalyzer Server activation).
Organization (optional) User organization name (used for QPR ProcessAnalyzer Server activation).
Email (mandatory) Contact person's email address (used for QPR ProcessAnalyzer Server activation).
JobTitle (optional) Contact person's job title (used for QPR ProcessAnalyzer Server activation).
PhoneNumber (optional) Contact person's phone number (used for QPR ProcessAnalyzer Server activation).
Address (optional) User organization address (used for QPR ProcessAnalyzer Server activation).
PostalCode (optional) User organization postal code (used for QPR ProcessAnalyzer Server activation).
City (optional) User organization city (used for QPR ProcessAnalyzer Server activation).
Region (optional) User organization region (used for QPR ProcessAnalyzer Server activation).
LicenseFilePath QPR ProcessAnalyzer Server license file path including the file name. For example C:\ProgramData\QPR Software\QPR ProcessAnalyzer\pa_service.lf. The license file is created when the QPR ProcessAnalyzer Server is activated. If changing the activation code, this file needs to be deleted manually to enable reactivation.
UseProxyServer If needed, define the proxy server for QPR ProcessAnalyzer Server activation.
ProxyAddress If needed, define the proxy server address for QPR ProcessAnalyzer Server activation.
ServiceUrl Legacy setting. Do not change it.
ModelLoadOnStartup Determines whether QPR ProcessAnalyzer models having setting LoadOnStartup as true are loaded automatically during server startup. By default, this setting should be set to True. This setting can be used to temporarily disable automatic model loading for all models when for example automatic model loading causes issues.
EMSAddress Activation server address https://activation.qpr.com/ that is contacted when the QPR ProcessAnalyzer Server is activated. Do not change this setting.
ConnectionType This setting should be Database.

Database Connection String

This section defines a connection string to QPR ProcessAnalyzer database. Check whether you are using an SQL Server default instance or a named instance, and whether an SQL Server authentication or Windows authentication is used.

Connect to SQL Server default instance using SQL Server authentication:

Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;

Connect to SQL Server default instance using Windows authentication:

Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;

Connect to SQL Server named instance using SQL Server authentication:

Server=myServerName\myInstanceName;Database=myDataBase;User Id=myUsername;Password=myPassword;

Connect to SQL Server named instance using Windows authentication:

Server=myServerName\myInstanceName;Database=myDataBase;Trusted_Connection=True;

More information about connections strings: [1]. Example:

  <connectionStrings>
    <add name="Qpr.ProcessAnalyzer.Service.Properties.Settings.SqlDatabaseConnectionString" connectionString="Server=localhost\MSSQLSERVER2019;DataBase=QPRPA;User Id=USERNAME;Password=PASSWORD;" />
  </connectionStrings>

Caching Settings

These settings are in the system.runtime.caching section, and they define, how much operating system memory (RAM) QPR ProcessAnalyzer can use. Settings that can be changed:

Parameter name Description
physicalMemoryLimitPercentage Maximum percentage of server physical memory that can be used by the QPR ProcessAnalyzer Server instance. The default value is 0, which means that the maximum is determined automatically.
pollingInterval Time interval after the current memory usage is compared against the defined physicalMemoryLimitPercentage setting. The value is entered in HH:MM:SS format. If more memory is used than either of the limits, cached data (eventlogs and analysis results) are dropped from the memory. Recommended value is 00:00:10.
cacheMemoryLimitMegabytes Don't change this setting, and use value 0.

Configuration example:

<memoryCache>
  <namedCaches>
    <add name="Default" cacheMemoryLimitMegabytes="0" physicalMemoryLimitPercentage="80" pollingInterval="00:00:10" />
  </namedCaches>
</memoryCache>

More information: https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/runtime/memorycache-element-cache-settings

Logging Settings

QPR ProcessAnalyzer uses log4net for log writing (https://logging.apache.org/log4net/) allowing to flexibly define log writing related settings. For example, the following settings can be changed:

Service API Settings

These settings are in the Qpr.ProcessAnalyzer.Service.Api.Properties.Settings section.

Parameter name Description
IncludeExceptionDetailsInErrors Determines whether stack straces are included to the error messages. False (recommended setting) means that the stack trace is not sent, and True means that the stack trace is sent. Stack traces give more information for technical persons to find out the reason for an error, but revealing the detailed information in stack traces can be a risk from the information security point of view.