Accessing and Analyzing IIS Logs

How to find and assesIIS logs?

IIS logs serve as a valuable resource for breaking down problems related to IIS-hosted applications. This includes UiPath tools like our Windows-based Orchestrator and Test Manager among others, making these logs quite instrumental in our troubleshooting efforts.

Accessing IIS Logs

Default location:

C:\inetpub\logs\LogFiles

How to check:

  1. Open IIS Manager: Start Menu -> Internet Information Services (IIS) Manager.
  2. Select Orchestrator on the left-hand pane:

  1. Double-click the "Logging" Icon in the middle pane under the IIS Section:

  1. Check the path in the directory field to see where IIS logs are stored

  1. Visit the location in Windows Explorer

  1. There is a folder created per site with a prefix of W3SVC with a number appended that corresponds to the site ID.
  2. To determine the site ID click on the Sites folder in the left pane of IIS:

  1. The middle pane will show a table with the site name and corresponding site ID. From the screenshot below, Orchestrator has a site ID of 2:

  1. Within the Orchestrator folder, W3SVC2, there are log files per day. The format is as follows: u_ex followed by the date (YYMMDD).log:

Analyzing IIS Logs

The log file contains entries like the following:

#Software: Microsoft Internet Information Services 10.0
#Version: 1.0
#Date: 2024-12-09 22:51:55
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2024-12-09 22:51:55 fe80::c778:d04f:4086:15d7%11 GET /odata/$metadata - 443 - fe80::c778:d04f:4086:15d7%11 - - 200 0 0 768
2024-12-09 22:52:22 fe80::c778:d04f:4086:15d7%11 GET /identity/.well-known/openid-configuration - 443 - fe80::c778:d04f:4086:15d7%11 - - 200 0 0 26233
2024-12-09 22:52:22 fe80::c778:d04f:4086:15d7%11 GET /identity/.well-known/openid-configuration/jwks - 443 - fe80::c778:d04f:4086:15d7%11 - - 200 0 0 344
2024-12-09 22:52:24 fe80::c778:d04f:4086:15d7%11 POST /identity/connect/token - 443 - fe80::c778:d04f:4086:15d7%11 - - 200 0 0 964
2024-12-09 22:53:42 fe80::c778:d04f:4086:15d7%11 POST /api/robotsservice/HeartbeatV2 - 443 - fe80::c778:d04f:4086:15d7%11 - - 200 0 0 212

The #Fields: line defines what each column in the following lines is.
Fields are selected and defined by clicking the Select Fields button in the Logging section of IIS.

Dashes ( - ) represent fields where there isn't a value. The log is space-delimited and can be imported into Excel.

For example, the following line shows a successful heartbeat made from a robot residing on the same server as the Orchestrator server, taking 212 ms.

2024-12-09 22:53:42 fe80::c778:d04f:4086:15d7%11 POST /api/robotsservice/HeartbeatV2 - 443 - fe80::c778:d04f:4086:15d7%11 - - 200 0 0 212

IIS logs track incoming requests to the Orchestrator site and can help rule out network and/or load balancer issues. Analysis can also be done on log files to determine which requests take longer to help troubleshoot performance issues and diagnose Orchestrator slowness.