Changing the compression method to Gzip

Starting from PowerServer 2022, the Brotli compression method is used by default. However, LoadRunner does not support Brotli. If you want to use LoadRunner, you will need to change PowerServer to use Gzip.

To change the compression method from Brotli to Gzip in PowerServer:

Step 1: Open the Startup.cs file in the ServerAPIs project of the PowerServer C# solution.

Step 2: Add the following using statements:

using System.IO.Compression;
using Microsoft.AspNetCore.ResponseCompression;

Step 3: Add the following scripts to the ConfigureServices method (compression will change to use Gzip instead of the default Brotli):

            services.AddResponseCompression(options =>
            {
                options.Providers.Clear();
                options.EnableForHttps = true;
                options.Providers.Add<GzipCompressionProvider>();
            });
            services.Configure<GzipCompressionProviderOptions>(options => { options.Level = CompressionLevel.SmallestSize; });