Precompiling and Warming Up Infor SLXClient and SData Portals Using aspnet_compiler.exe
When hosting Infor SLXClient and SData portals on IIS, the first request after an application pool restart can experience slow response times due to Just-In-Time (JIT) compilation. To improve the user experience, you can precompile these portals using the built-in aspnet_compiler.exe, effectively “warming up” the sites.
This blog post will guide you through:
- Using
aspnet_compiler.exeto precompile the portals. - Determining the correct IIS Site ID to use in the metabase path.
- Automating the process using a simple batch script.
1. Understanding aspnet_compiler.exe
The ASP.NET compiler is a command-line tool that precompiles an ASP.NET web application, reducing runtime compilation overhead. In our case, we use the -m flag to specify an IIS metabase path, ensuring that our portals are precompiled before users access them.
Syntax:
C:\Windows\Microsoft.Net\Framework\v4.0.30319\aspnet_compiler.exe -m "MetabasePath"
Where:
-mindicates that the site is defined in IIS Metabase (not a file path)."MetabasePath"specifies the IIS metabase location of the portal.
2. Finding the Correct IIS Site ID
Before running the script, we need to determine the correct Site ID in IIS, as the metabase path follows this format:
/LM/W3SVC/[SiteID]/Root/[ApplicationName]
Steps to Find Your IIS Site ID:
- Open Command Prompt as Administrator.
- Run the following command to list all IIS sites:
appcmd list sites
The output will look something like this:
SITE "Default Web Site" (id:1,bindings:http/*:80:,state:Started)
SITE "InforSLX" (id:2,bindings:http/*:3333:,state:Started)
Locate your Infor SLXClient and SData sites. Note the Site ID (e.g., 2 for “InforSLX”).
Your metabase paths will be:
- SLXClient:
/LM/W3SVC/2/Root/SlxClient - SData:
/LM/W3SVC/2/Root/SData
3. Automating the Process with a Batch Script
Instead of running the commands manually, we can create a batch script (.bat file) to warm up both portals automatically.
Batch Script: warmup_slx.bat
@echo off
echo Script started at %DATE% %TIME%
set exe="C:\Windows\Microsoft.Net\Framework\v4.0.30319\aspnet_compiler.exe"
set portals="/LM/W3SVC/2/Root/SlxClient" "/LM/W3SVC/2/Root/SData"
for %%p in (%portals%) do (
echo Starting %%p at %DATE% %TIME%
%exe% -m "%%p" >nul
echo Ending %%p at %DATE% %TIME%
)
echo Script ended at %DATE% %TIME%
4. Running the Script
- Save the script as
warmup_slx.bat. - Right-click the file and select Run as Administrator.
- The script will:
- Precompile SLXClient and SData portals.
- Output timestamps for each step.
- When completed, your portals will be precompiled and ready for fast response times.
5. Scheduling Automatic Warm-Up After Server Restart
To ensure this script runs after a server reboot:
- Open Task Scheduler (
taskschd.msc). - Click Create Basic Task.
- Set Trigger to “At startup” or “On IIS service start”.
- Under Action, choose Start a Program and browse for
warmup_slx.bat. - Check Run with highest privileges to ensure it runs as Administrator.
By using aspnet_compiler.exe with the correct IIS metabase path, we can effectively precompile and warm up Infor SLXClient and SData portals, improving response times for users. Automating this process ensures optimal performance after a server restart or application pool recycle.




Is there a way to automatically run the batch after deploying the portals?
Hi Tim,
There are two options for this.
Option 1) Create your own deployment action extension DLL for Application Architect. It could execute the batch after a deployment. See an article on creating one of these here: https://customerfx.com/article/creating-custom-deployment-actions-for-portals-in-application-architect-for-infor-crm/
Option 2) Perform the entire deployment (and build, if wanted) via a batch. Then after the deployment commands complete, the batch could also perform the commands Jason outlines in this article. You can see an article on the deployment command line options here: https://customerfx.com/article/automating-the-build-deploy-process-for-infor-crm/
Ryan
Thanks, Ryan!
Oh wow, I didn’t know that the AA was customizable and supports automation. This will certainly be something I’ll read up on. Thanks indeed, Ryan! And thanks, Jason!