Skip to content

Configuring the CodeLogic Windows .NET Agent

Your CodeLogic agent needs to be configured in order to scan your unique environment.

Edit the agent configuration on the host where the agent is installed. The .NET agent uses appsettings.json in the CodeLogic NetCape install directory (for example, C:\Program Files (x86)\CodeLogic\NetCape\appsettings.json). Restart the agent service after saving changes.

The following settings are available in the agent configuration:

* **[Agent ID](Glossary.md#agent-id)** - The [Agent ID](Glossary.md#agent-id) is a unique identifier assigned by CodeLogic and is not configurable.
* **[Agent](Glossary.md#agent) Type** - The [Agent](Glossary.md#agent) Type is the type of agent you have installed and is not configurable.
* **[Agent](Glossary.md#agent) Name** - The [Agent](Glossary.md#agent) Name is the name you entered during installation. If you did not enter a descriptive name, the default name is used. To rename the agent, update the name in the configuration file.
* **[Agent](Glossary.md#agent) Description** - The [Agent](Glossary.md#agent) Description is a text field where you can enter a description for the agent.
* **Schedule** - The schedule for scanning is configurable using a cron‑style entry. The default schedule is every four hours, every day, starting at 00:00.

    The scan is scheduled using a cron-like definition based upon the CronTrigger class. It is similar to entries specified in `man -S 5 crontab` but the fields and allowed characters differ slightly to allow for more powerful scheduling.

    | Field Name   | Allowed Values  | Allowed Special Characters |
    | ---          | ---             | ---                        |
    | Seconds      | 0-59            | , - \* /                   |
    | Minutes      | 0-59            | , - \* /                   |
    | Hours        | 0-23            | , - \* /                   |
    | Day of Month | 1-31            | , - \* ? / L W             |
    | Month        | 1-12 or JAN-DEC | , - \* /                   |
    | Day of Week  | 1-7 or SUN-SAT  | , - \* ? / L W             |

     * Special characters:
        * **\*** (“all values”)
        * **? (“no specific value”)** – for example, when the scan should take place on the 10th day of the month any day of the week is acceptable
        * **-**- used to specify ranges – for example, 1-3 in the day of the month field means the 1st, 2nd, and 3rd day of the month
        * **,**- used to specify additional values – for example, “TUES, THUR” in the Day of Week field means Tuesday and Thursday
        * **/**- used to specify the starting value and an increment – for example, 0/10 in the Minutes field means “the minutes 0, 10, 20, 30, 40, and 50”
        * **L(“last”)** – the meaning of this character changes depending upon which field it is in, for example, “L” in the Day of Week field means Saturday but it can be combined for a specification like 5L, which means the last Thursday of the month
        * **W(“weekday”)** - the weekday nearest specified day, for example, 20W is the weekday closest to the 20th day of the month
        * **#**- used to specify “the nth” NNN day of the month, for example, “5#1” = the first Thursday of the month and “4#3” = the third Wednesday of the month

        <!-- markdownlint-disable MD036 -->
        *Scheduling examples*
        <!-- markdownlint-enable MD036 -->

        * Scan every half hour starting at the top of the hour, every weekday

            `0 0/30 \* \* \* MON-FRI`

        * Scan every half hour, between the hours of 9 AM and 5 PM (0900 and 1700), every weekday

            `0 0/30 9-17 ? \* MON-FRI`

        * Scan at 9:40 PM (2140) every day

            `0 40 21 ? \* \*`

* **Batch Size** - The Batch Size is the combined number of nodes and relationships to reach before sending information to the CodeLogic Server.
* **Logging Level** - The log level of the client. A change to this field is not typically needed.
* **Scan Configurations** - The scan configuration settings specify the configurations used during analysis.

    /// note | Note
    If command line parameters are passed in, this section is ignored in favor of the command line parameters.
    ///

        * **[Application](Glossary.md#application)** - The [Application](Glossary.md#application) field is the application to group the items found in the scan.
        * **Skip Subdirectories** - When checked, sub-directories are skipped during search.
        * **IIS Analysis** - When checked, IIS is analyzed. If checked, Paths must not be set.
        * **Show Compiler Generated** - When checked, compiler generated code is shown in resulting output.

* **Paths** - Directories to be scanned.
* **List of websites** - Website names to filter IIS analysis by. This field is only necessary if IISAnalysis is checked.
* **List of filter patterns** - Specific applications to analyze. A simple match pattern is used.
* **A list of databases** - Databases to be scanned. Known databases should always be specified. Using a connection that is not the identity will result in no relationships being formed.
  • Optionally, add an additional Agent Configuration section.
  • Logging * Logging IIS configured in appsettings.json file in the directory where you installed CodeLogic.

Note

CodeLogic uses standard .NET logging. For more information, see https://docs.microsoft.com/en-us/dotnet/core/extensions/logging?tabs=command-line#configure-logging.