1. Backup directory

A detailed information about the applications listed below is provided in the separate guide Backup.

1.1. BackupServerService.exe

Service installed on the client station, intended for regular download of backups performed on the server by the “BackupServer.exe” program.

1.2. BackupServer.exe

Program run on the server manually or by a scheduled task, intended for backup:

  • IIS server settings,
  • scheduled task settings,
  • Firebird and MSSQL databases and
  • directories.

A full backup (a file with the “-x.zip” suffix) is always created after the set interval in days has elapsed, or once a month if the interval is not filled in; if the last full backup is larger than 10 GB, it is created only at the weekend. Incremental backups are created between full backups. When a full backup is created, backups whose date in the name is 8 or more days older than the date of the new backup are deleted; between full backups, only those of them that are also older than the last full backup are deleted. The date of the new backup is the day before the program is run. Before backing up each database, the program deletes usage statistics records older than one month.

1.3. FileBackup.exe

Program run on the server manually or by a scheduled task, intended for backup:

  • IIS server settings,
  • NET Genium and
  • file attachments.

With the “/restore” switch, it also restores the backed up files and creates a “log” file in the current working directory with a list of file attachments that have been restored and those that have not, and with the files of the NET Genium directory that could not be restored. The restore never overwrites a file that already exists on the disk.

  • Use: “FileBackup.exe backupdir [/noiis] [/no0zip]”, “FileBackup.exe backupdir /restore”, “FileBackup.exe /iisonly”
  • The “backupdir” backup directory is mandatory; without it, the program displays help and exits with return code 1.

1.4. SqlBackup.exe

Program for backing up and restoring Firebird and MSSQL databases and for performing a number of service operations using switches.

  • Service operations are always performed in the current database defined in the “ConnectionString.txt” file.
  • Database backup and restore is described in the separate guide Database backup and restore.
  • Details
    • Most service operations write their progress into a text file with the “.log” extension; the location of the file is given for the individual switches. Some files are extended with each run, others (for example “Run.log”, “UnusedFiles.log” and “UnusedQueries.log”) are overwritten.
    • If the program is running and the required parameters are not specified for the relevant switch, the user will be asked for these parameters.
    • The case of letters in switch names does not matter. Parameter values (for example the searched string of the “/find” switch) are compared case-sensitively. If the “/find” and “/sysfind” switches are run without a parameter, the program asks after the searched string is entered whether the case of letters should be distinguished.
    • Any answer to a program question ending with “(Y/N)” is considered consent, except for an answer starting with the letter “N” – including just pressing the “enter” key.
  • Switches can also be specified when running the “SqlBackup.exe” program without a parameter. When the following screen appears, it is necessary to enter the text of the switch, and confirm by pressing the “enter” key.

Obrázek.png

  • Information about processed logs is stored in “log” files.
  • Example of information in the “log” file:
TABLE susers RECORD ID 1
* loginname: Administrator

Indicates that a record has been processed in the “susers” table that has ID 1 in this table. The processed value is “Administrator” in the “loginname” column.

1.4.1. /bandwidth

The “SqlBackup.exe” program, run with the “/bandwidth” parameter, reads all “log” files created by IIS logging and measures how NET Genium loads the internal computer network in which the NET Genium server is located.

  • The result of the command is a calculation of the amount of data that flows through the given NET Genium instance over a certain period of time.
  • The program reads the log files in the current working directory, without subdirectories. The “SqlBackup.exe /bandwidth” command must therefore be run in the directory containing the log files created by IIS.
  • In addition to the “Bandwidth.txt” file created when the command is run, a summary of the results is displayed on the command line.
  • The summary can be used to find out, for example, the total number of bytes, the number of days and hours, or the number of bytes per 24 hours.
  • For each date, the output also shows the time when the most bytes were transferred, how many bytes were transferred during the peak time, and what the bandwidth was during that peak time.
  • Details
    • The peak is the minute with the most bytes transferred – the value labelled “Peak bytes per second” is also the amount transferred during this minute. The program takes the times from the IIS log unchanged (the W3C format writes them in UTC).
  • Use: “SqlBackup.exe /bandwidth”
    Creates a “Bandwidth.txt” file located in the current working directory

Obrázek.png

To create “log” files in IIS, it is necessary to enable and set “Logging”.

To turn on logging in IIS

  • Open the “Logging” function
    • “Logging” can be set for both IIS and individual applications running in IIS. In both cases, the “Logging” function opens in the middle part of the “Internet Information Services Manager” window in the “IIS” section under the “Logging” button.

Obrázek.png

  • Click the “Allow” button
    • Pressing the “Enable” button ensures that the log file is written according to the settings.

Obrázek.png

Logging settings

Obrázek.png

  • 1 – set the logging validity for “Web” as for the selected application from IIS
  • 2 – set the log file format. It is necessary to select “W3C” for the “SqlBackup.exe /bandwidth” command. Other options:
    • “IIS”
    • “NCSA”
    • “Own”
  • 3 – press the “Select field” button. Only selecting the “W3C” option makes it possible to select a field in the log file. For the functionality of the command “SqlBackup.exe /bandwidth” it is necessary to select the fields “Date”, “Time”, “Sent bytes (sc-bytes)”, “Received bytes (cs-bytes)”.

Obrázek.png

  • 4 – set the log file storage path. The default path is “% SystemDrive%\inetpub\logs\LogFiles”
  • 5 – set the log file encoding. Options:
    • UTF – 8
    • ANSI
  • 6 – set the destination for logging events
    • In addition to the defined log file, it is also possible to write “Logging” to the “Event tracing for Windows” event. However, for the analysis run by the “SqlBackup.exe /bandwidth” command, it is necessary to select the “Log file only” option.
  • 7 – set the method of IIS writing to the log file. Select the “Schedule” option, which can be selected from the following options:
    • “Hourly”
    • “Daily”
    • “Weekly”
    • “Monthly”

1.4.2. /br

The “SqlBackup.exe” program run with the “/br” parameter backs up and restores the database defined in the “ConnectionString.txt” file. The reason for this operation is to reorganize the database file, free up unused space (shrink) and recreate all indexes. The operation is intended for Firebird databases only; for MSSQL databases, the program ends with a message.

  • For the duration of the operation, NET Genium is deactivated by the “UnderConstruction.txt” file in the “Config” directory, and all connected clients are disconnected from the database before the restore. After a successful completion, the program deletes the file; if the file already existed before the program was started, it keeps it.
  • If the operation ends with an error, the “UnderConstruction.txt” file remains in the “Config” directory and NET Genium remains deactivated until the administrator deletes the file (for example with the “Activate.exe” program).
  • The backup file (“.fbk”) remains in the current working directory.
  • Details
    • At the end, the program always waits for the Enter key to be pressed, even when it is run by a scheduled task, and it returns exit code 0 even when the operation ends with an error or does not start at all (a missing “ConnectionString.txt” file, an MSSQL database).

1.4.3. /datagridsettings

The “SqlBackup.exe” program run with the “/datagridsettings” parameter overrides the datagrid settings of all portal users according to the datagrid settings of the selected user. After starting the application with the command “/datagridsettings”, the user must fill in the login name of the user, according to whose datagrid settings the datagrid settings will be overwritten by other users.

Obrázek.png

In addition, the user can choose from two types of profiles that specify the datagrids for which the settings will be overwritten:

  • “All datagrids” – the settings of all datagrids for which the selected user has saved their own settings will be overwritten; for the other datagrids, the settings of users remain unchanged
  • “Type datagrid ID” – the settings of only the selected datagrid will be overwritten
  • Details
    • If the selected user has no own settings saved for the specified datagrid, the program changes nothing and still reports success.

Obrázek.png

After that, the user is already shown a message whether the datagrid settings were overwritten. When overwriting the settings of individual datagrids for individual users, the default settings of the given datagrid are always overwritten. The individual settings of the affected datagrids of all users, including filters and sorting, are deleted. After completion, the program restarts the NET Genium web application.

Obrázek.png

  • Use: “SqlBackup.exe /datagridsettings [loginname] [dgid]”

1.4.4. /deletedata

The “SqlBackup.exe” program run with the “/deletedata” parameter deletes the contents of all edit form tables in the database, including the change history tables, except the contents of the “susers”, “susergroups”, “srightsgroups”, “slayout” and “sholiday” tables. Attachment files on the disk remain.

  • Use: “SqlBackup.exe /deletedata”

1.4.5. /deletelogs

The “SqlBackup.exe” program, run with the “/deletelogs” parameter, deletes the contents of the “stables_stats”, “sviewpages_stats”, “squerybuilder_stats”, “sngef_stats” and “sngscript_stats” log tables, and deletes the log files on the disk – files in the “Logs” directory whose name begins with a date (for example “2026-10-06.log”) and the contents of the date subdirectories “Logs\...\yyyy-mm-dd”. Monthly logs with a prefix (for example “Data-yyyy-MM.log”) are not deleted.

  • Without the “createdbeforeindays” parameter, the program deletes the entire contents of the log tables – on MS SQL Server using the “TRUNCATE TABLE” command, on Firebird by dropping the tables and creating them again (if that fails, it deletes all their records) – and deletes the log files older than 7 days from the disk.
  • With the “createdbeforeindays” parameter, the program deletes records older than the specified number of days from the log tables, and deletes the log files older than the specified number of days from the disk. The value 0 behaves the same as an omitted parameter.
  • Regular log cleanup is set up as a scheduled Windows task run once a day, for example “SqlBackup.exe /deletelogs 42”. A detailed description of scheduled tasks is provided in the separate guide Scheduled tasks.
  • A one-off cleanup of a database in which logs have been accumulating for many months is best performed without the parameter first – on MS SQL Server, unlike deleting by days, “TRUNCATE TABLE” does not load the transaction log of the database. Only then does it make sense to set up a regular task with the parameter, which then deletes small daily increments.
  • Details
    • The program writes the progress of the deletion into the “Backup\DeleteLogs.log” file.
    • Log files without a date in their name (for example “Errors.log”, “Warnings.log”, “System.log”, “Version.log” and “RunningTasks.log”) are not deleted by the program. Neither the “Delete old logs on the disk” option in the NET Genium settings nor NET Genium at application start deletes them, and “ResendEmlFiles.exe” does not pack them, so their size has to be watched and the files cleaned up manually.
  • Use: “SqlBackup.exe /deletelogs [createdbeforeindays]”

1.4.6. /dirstats

The “SqlBackup.exe” program, run with the “/dirstats” parameter, displays file statistics for the given directory. If the command is run without a parameter, the statistics are calculated for the current directory. If a parameter is entered (path to the required directory), the statistics are calculated for the specified directory. After starting, the program offers a profile:

  • “Total files, attachments, max ID” – the number of files, the number of attachments (files with a numeric name) and the highest attachment ID.
  • “Total files, attachments, max ID, list of attachments” – the same, and in addition the list of attachments sorted by ID and the files that do not have a numeric name or have a duplicate ID in the “dirstats.log” file.
  • “Total files, attachments, bytes and dates & ... per day” – the number and size of attachments, the number of days on which the attachments were created and the average per day; besides the summary also a breakdown by the creation date of the file: today, yesterday and in the last 30 days. The program first asks for the lowest attachment ID (“fromId”) and, if it is not entered, for the earliest creation date (“fromDate”). If one of them is entered, the program lists the number and size of attachments for individual days instead of the summary for today, yesterday and the last 30 days.
  • Details
    • If the program is run without a parameter in the “Backup” directory of a NET Genium installation, it offers a choice between the current directory and the “Files” directory.
    • In the “Files” directory, the program reads the attachments in the same way as NET Genium, i.e. including the subdirectories with attachments; in another directory, it counts only the files directly in it, without subdirectories.
  • Use: “SqlBackup.exe /dirstats [directory]”
    Creates a “dirstats.log” file in the current working directory

Obrázek.png

1.4.7. /exportchanges

The “SqlBackup.exe” program run with the “/exportchanges” parameter exports a list of all data differences between the current database defined by the “ConnectionString.txt” file in the “Config” directory and the other database whose “connection string” is entered after starting the program “SqlBackup.exe” with the “/exportchanges” parameter. For each table in which it finds differences, it creates in the “Backup” directory of the NET Genium installation a “table_name.xml” file with the records of the other database that are missing in the current database or differ from it, and a “table_name.log” file with “DELETE” commands for the records of the current database that are not in the other database. Each of the two files is created only if there is something to write into it. The program does not delete files from the previous run: a file that the new run creates again for a given table is overwritten, but the “.xml” or “.log” file of a table for which the new run does not create that file remains in the “Backup” directory as it was after the previous run. Before the next run, the files of the previous export therefore need to be removed from the “Backup” directory if they are not to be mixed with the result of the new comparison.

1.4.8. /exporttable

The “SqlBackup.exe” program run with the “/exporttable” parameter exports the database structure of the selected table and all data stored in the selected table. The exported table can be defined in the following ways:

By selecting from the list of tables that the program “SqlBackup.exe” finds in the NET Genium database (the list also includes system tables)

Obrázek.png

By inserting the database identifier of the table

Obrázek.png

By inserting an SQL query

Obrázek.png

By selecting “All tables” – all tables are exported.

For the second and third options, the correct table identifiers must be specified, otherwise an error will be returned when exporting the table. For the first, second and fourth options, all columns and data are exported. In the third option, it is possible to limit the number of exported columns from the database structure of the table as well as the number of exported data (SQL query condition).

  • Use: “SqlBackup.exe /exporttable [name]”
    Creates an XML file in the “Backup” directory of the NET Genium installation, in the name of which the table export date and the table name are specified (eg “2016-10-31-ng_action”)

1.4.9. /find

The “SqlBackup.exe” program run with the “/find” parameter searches the string specified by the parameter in all text columns of all user tables. The exact match of the value in the given column with the specified parameter is searched for, not a substring. The change history tables are searched as well, including the column with the login name of the author of the change.

  • Use: “SqlBackup.exe /find value”
    Creates a “Find.log” file located in the same directory as the “SqlBackup.exe” program

1.4.10. /findattachment

The “SqlBackup.exe” program run with the “/findattachment” parameter searches for the use of the file attachment specified by the parameter – its ID. The command returns all occurrences (tables) in which the searched file attachment is located. The search is performed in the following places:

  • “image” column in the “sappgroups” table
  • “def” column in the “sviewfields” table for “RichText” controls
  • “val” column in the “scolumns” table for “RichText” controls
  • “value” column in the “schat” table
  • In all user tables in columns of type “File” or “Image”, or in columns of type “RichTextBox” if the user confirms that he should search in these columns
  • Details
    • The “value” parameter may contain several IDs separated by a comma or a semicolon. A value from which no ID can be read is searched for as a file name in the “sfiles” table.
    • The program asks whether to search the “RichText” controls and the “schat” table and whether to search the columns of type “RichTextBox” only when it is run without a parameter, and only after an ID is entered. With a parameter containing an ID, it searches all places; it searches for a file name only in the “sfiles” table.
  • Use: “SqlBackup.exe /findattachment value”
    Creates a “FindAttachment.log” file located in the same directory as the “SqlBackup.exe” program

1.4.11. /findselects

The “SqlBackup.exe” program run with the “/findselects” parameter searches for SQL queries starting with the “SELECT” clause in “log” files (NET Genium logging to disk) and in older “csv” files in the directory specified by the “directory” parameter and in all its subdirectories. Without the parameter, it searches the log directory of the NET Genium installation, including its redirection.

Details
  • After starting, the program asks for the searched substrings separated by a semicolon (a query must contain all of them, letter case is distinguished) and for the maximum number of queries (0 means no limit). It skips lines containing the text “ ERROR ” and repeated queries.
  • The program appends the results to the end of the “FindSelects.sql” file – the results of previous runs remain in it.
  • Use: “SqlBackup.exe /findselects [directory]”
    Creates a “FindSelects.sql” file located in the same directory as the “SqlBackup.exe” program

1.4.12. /findunsafetags

The “SqlBackup.exe” program, run with the “/findunsafetags” parameter, searches the database for any dangerous tags that may have been created by the database, such as SQL Injection. NET Genium itself is secure against SQL Injection, but the weak point may be web applications connected to the NET Genium database.

Details
  • The program does not search the values of “TextArea” controls with the data types intended for source code (“Source code”, HTML, XML, JavaScript, C#, C++ and JSON). Dangerous tags found in diagrams stored in “RichTextBox” controls are written only to the “FindUnsafeTags.log” file, not to the “FindUnsafeTags_Trash.txt” file.
  • Use: “SqlBackup.exe /findunsafetags”
    Creates the “FindUnsafeTags.log” file located in the same directory as the “SqlBackup.exe” program and the “FindUnsafeTags_Trash.txt” file in the current working directory, where all dangerous tags are listed

1.4.13. /importtable

The “SqlBackup.exe” program run with the “/importtable” parameter imports the contents of the database table into NET Genium. The imported table is selected from the list of XML files that the “SqlBackup.exe” program finds in the “Backup” directory.

Obrázek.png

The “SqlBackup.exe” application also displays a menu to the user, from which the user chooses whether to import the selected table directly or to perform an import test of the selected table first. The result of the test is a file with the extension “.sql” and with the same name as the name of the imported file, which contains a list of all SQL queries necessary for importing the contents of the database table.

Obrázek.png

After selecting the import profile, the “SqlBackup.exe” program will ask the user:

  • if all records found in the database in the table corresponding to the identifier of the imported table are to be deleted first, and if not, then
    • if the import will include at least 1 “INSERT” query,
    • if the import will include at least 1 “UPDATE” query,
    • and if the import includes at least 1 “INSERT” query, whether records with the same ID as the records contained in the import XML file (“DELETE”) should be deleted,
  • and whether to disable all indexes located in the imported table before starting the import.

Obrázek.png

Obrázek.png

  • Use: “SqlBackup.exe /importtable”
    When a single XML file is imported, creates a file with the import progress next to it, with the same name and the “.log” extension; when multiple files are imported, creates an “ImportTable.log” file in the “Backup” directory

1.4.14. /movegroups

The “SqlBackup.exe” program run with the “/movegroups” parameter renumbers all user groups except the “Administrators” (ID 1) and “Users” (ID 2) user groups. The command adds the number specified in the parameter to the user group ID. It is also possible to insert negative values into the parameter – renumbering downwards. If the user group has a newly calculated ID less than or equal to 2, the command returns an interrupt and the renumbering is not performed. The command also scans all rights tables, the list of allowed IP addresses, the list of public external functions, javascripts (“jsUserInGroup” function) and scripts (“USERSINGROUP”, “TEFUIG” and “TESUIG” functions) and sets new user group IDs in them. The whole renumbering runs in a single transaction – if it ends with an error, no change is made.

Details
  • Apart from the rights tables, the list of allowed IP addresses and the list of public external functions, the program changes only the parameters of the listed functions. User group IDs stored in the data of edit forms (for example in a foreign key to a user group) or written elsewhere, for example in query conditions, must be adjusted manually after the renumbering.
  • Use: “SqlBackup.exe /movegroups number”
    Creates a “MoveGroups.log” file located in the same directory as the “SqlBackup.exe” program

1.4.15. /moveyear

The “SqlBackup.exe” program run with the “/moveyear” parameter moves the year in the values of database controls with a date and in the text values of database controls where the date occurrence is found, in all edit forms including the system ones. The change is also made in the change history tables; the date and time of the change in the history are not moved. The change will not be made for the “sholiday”, “sinvalidlogins”, “sstatistics” and “ssynchro” tables. The command adds the number of years specified as a parameter to each date. It is also possible to insert negative values into the parameter – renumbering downwards.

Details
  • The changes do not run in a transaction – if the program ends with an error, the values moved until then remain moved.
  • Use: “SqlBackup.exe /moveyear numberofyears”
    Creates a “MoveYear.log” file located in the same directory as the “SqlBackup.exe” program

1.4.16. /readdbffiles

The “SqlBackup.exe” program run with the “/readdbffiles” parameter analyzes all “dbf” files in the directory specified by the “directory” parameter, without the parameter in the current working directory, and for each “dbf” file creates a detailed report with the contents of the “dbf” file next to it (a file with the “.dbf.txt” extension).

  • Use: “SqlBackup.exe /readdbffiles [directory]”

1.4.17. /reademlfiles

The “SqlBackup.exe” program run with the “/reademlfiles” parameter analyzes all “eml” files in the directory specified by the “directory” parameter, without the parameter in the current working directory, and for each “eml” file creates detailed reports with the contents of the “eml” file next to it (files with the “.eml.txt”, “.eml.htm” and “.eml.txt.htm” extensions). It saves the attachments of the message into a subdirectory named after the file name of the message without the extension; the program first deletes the files that are already in this subdirectory.

  • Use: “SqlBackup.exe /reademlfiles [directory]”

1.4.18. /rebuildindexes

The “SqlBackup.exe” program run with the “/rebuildindexes” parameter defragments all indexes whose percentage fragmentation is greater than or equal to the value of the “fragmentationthreshold” parameter. Index rebuilding is recommended in cases where index fragmentation is greater than 30%. For a Firebird database, the “fragmentationthreshold” parameter does not apply – the program deactivates and reactivates all indexes except foreign key indexes, and the “/rebuildindexes” and “/reorganizeindexes” switches therefore behave the same.

  • Use: “SqlBackup.exe /rebuildindexes fragmentationthreshold”
    Creates a “RebuildIndexes.log” file in the “Backup” directory of the NET Genium installation

1.4.19. /remove

The “SqlBackup.exe” program run with the “/remove” parameter looks for the string specified by the parameter in all text columns of all user tables, and replaces it with an empty string. To find a string, it is not necessary to exactly match the value in the given column with the specified parameter, it can also be a substring. The change is also made in the change history tables, including the column with the login name of the author of the change. The program makes the change without further confirmation.

  • Use: “SqlBackup.exe /remove value”
    Creates a “Remove.log” file located in the same directory as the “SqlBackup.exe” program

1.4.20. /removeunsafetags

The “SqlBackup.exe” program run with the “/removeunsafetags” parameter removes from the database all dangerous tags that could have been created by infecting the database, for example using SQL Injection. NET Genium itself is secure against SQL Injection, but the weak point may be web applications connected to the NET Genium database.

Details
  • The program does not change the values of “TextArea” controls with the data types intended for source code (“Source code”, HTML, XML, JavaScript, C#, C++ and JSON), not even in the change history tables. From diagrams stored in “RichTextBox” controls, it removes dangerous tags without damaging the diagram data.
  • Use: “SqlBackup.exe /removeunsafetags”
    Creates a “RemoveUnsafeTags.log” file located in the same directory as the “SqlBackup.exe” program

1.4.21. /reorganizeindexes

The “SqlBackup.exe” program run with the “/reorganizeindexes” parameter defragments all indexes whose percentage fragmentation is greater than or equal to the value of the “fragmentationthreshold” parameter. Index reorganization is recommended in cases where index fragmentation is less than 30%. The behavior for a Firebird database is described for the “/rebuildindexes” switch.

  • Use: “SqlBackup.exe /reorganizeindexes fragmentationthreshold”
    Creates a “ReorganizeIndexes.log” file in the “Backup” directory of the NET Genium installation

1.4.22. /replace

The “SqlBackup.exe” program run with the “/replace” parameter searches for the string specified by the first parameter in all text columns of all user tables, and replaces it with the string specified by the second parameter. The exact match of the value in the given column with the specified parameter is searched for. The change is also made in the change history tables, including the column with the login name of the author of the change. The program makes the change without further confirmation.

  • Use: “SqlBackup.exe /replace oldvalue newvalue”
    Creates a “Replace.log” file located in the same directory as the “SqlBackup.exe” program

1.4.23. /resetdatepickers

The “SqlBackup.exe” program run with the “/resetdatepickers” parameter deletes, for all users, the remembered “From” value of the time period filter in all datagrids, charts and other controls, so the default value is used the next time they are displayed.

  • Use: “SqlBackup.exe /resetdatepickers”

1.4.24. /rightsgroups

The “SqlBackup.exe” program running with the “/rightsgroups” parameter attempts to assign an existing rights group entry to each user on the system based on its defined user groups. If the application cannot find a matching rights group record, the application creates a new rights group record. This newly created rights group will have the same name and user groups as the user.

  • Use: “SqlBackup.exe /rightsgroups”

1.4.25. /run

The “SqlBackup.exe” program run with the “/run” parameter executes all the commands listed in the file that is specified as the “file” parameter. It is typically used in conjunction with “/unusedfiles” and “/unusedqueries” – the file name is given as a parameter.

  • Each line of the file is a separate command; the commands are executed one after another without a transaction, so commands executed before a possible error remain in effect.
  • Empty lines, lines starting with “//” and the “GO” and “COMMIT;” lines are skipped.
  • A line in the form “DELETE FILE path” deletes a file on the disk.
  • If an SQL command ends with an error, the program asks whether to repeat the command.
  • Use: “SqlBackup.exe /run file”
    Creates a “Run.log” file located in the same directory as the “SqlBackup.exe” program; the file is overwritten with each run

The “file” parameter can also be a log file that contains “SELECT” statements. All these commands will be run again, and the output file “Run.log” will record both the line from the original file and the result of the local execution of the query – the time of evaluation of the SQL query and the number of records returned.

  • The “file” parameter can be specified as:
  • File name itself (located in the same directory as the “SqlBackup.exe” program)
  • Relative path to a file on disk (relative to the directory of the “SqlBackup.exe” program, not to the current working directory)
  • Absolute path to the file on disk

1.4.26. /sysfind

The “SqlBackup.exe” program run with the “/sysfind” parameter looks for the string specified by the parameter in all columns of the NET Genium system tables except the first column, and in all text columns of the edit form tables and their change history tables. System tables whose name ends with “_history” or “_stats” are not searched. To find a string, it is not necessary to exactly match the value in the given column with the specified parameter, it can also be a substring.

  • Use: “SqlBackup.exe /sysfind value”
    Creates a “SysFind.log” file located in the same directory as the “SqlBackup.exe” program

1.4.27. /sysreplace

The “SqlBackup.exe” program, run with the “/sysreplace” parameter, finds the string specified by the first parameter in all text columns of the NET Genium system tables and of the edit form tables and their change history tables, and replaces it with the string specified by the second parameter. System tables whose name ends with “_history” or “_stats” are not searched. To find a string, it is not necessary to exactly match the value in the given column with the specified parameter, it can also be a substring.

  • Use: “SqlBackup.exe /sysreplace oldvalue newvalue”
    Creates a “SysReplace.log” file located in the same directory as the “SqlBackup.exe” program

1.4.28. /unusedfiles

The “SqlBackup.exe” program, run with the “/unusedfiles” parameter, looks for:

  • Orphaned files in the “Files” folder that are not referenced in the “sfiles” database table – STANDALONE UNUSED FILES section.
  • Database records in the “sfiles” table and the corresponding files in the “Files” folder, which are not referenced from any of the checked places – UNUSED FILES section. The checked places are controls of the “File”, “Image” and “RichTextBox” type, images inserted into “RichText” controls, background images of application groups, internal messages and unfinished file uploads. The program does not know references from other places (for example from external functions or from print templates).
  • Invalid references in user tables that reference non-existent database records in the “sfiles” table – MISSING ENTRIES IN 'SFILES' TABLE section.
  • Database records in the “sfiles” table whose files do not physically exist on the disk – section MISSING FILES IN 'NETGENIUM/FILES' DIRECTORY.

The “UnusedFiles.log” output file is a proposal for review, not a ready-made script to be run blindly. Lines starting with “//” are commented out – the “SqlBackup.exe /run UnusedFiles.log” command skips them and executes only the uncommented lines. The administrator therefore reviews the output and uncomments only what they really want to perform. There are two reasons for commenting out:

  • Protection of the last approximately 1000 attachments (UNUSED FILES section) – “sfiles” database records with the highest ID (the last ~1000 according to the “MAX(ID)” value shown in the section header) are output commented out. An attachment may have just been created by a service or an external function: the file has already been uploaded and the “sfiles” record exists, but the parent record referencing the attachment has not yet been saved to the database. If the analysis were run at that very moment, it would evaluate such an attachment as unused, and deleting it would “cut off” the attachment from the unfinished process. The newest attachments are therefore never deleted automatically – they are only offered for manual review.
  • Invalid references in live tables (MISSING ENTRIES IN 'SFILES' TABLE and MISSING FILES IN 'NETGENIUM/FILES' DIRECTORY sections) – the “UPDATE” command that clears an invalid reference to a non-existent attachment is commented out for ordinary (live) tables, because it modifies production data and must be reviewed manually. It is active (uncommented) only for history tables with the “_history” suffix.

In addition to the log file, the “SqlBackup.exe” program (run with the “/unusedfiles” parameter) can also create a “UnusedFiles” directory in the “Backup” directory, where copies of found files from the STANDALONE UNUSED FILES and UNUSED FILES sections will be stored. The optional “copyfiles” parameter must be specified to run this function (“SqlBackup.exe /unusedfiles /copyfiles”).

  • Use: “SqlBackup.exe /unusedfiles” followed by “SqlBackup.exe /run UnusedFiles.log”
    Creates a “UnusedFiles.log” file in the “Backup” directory of the NET Genium installation; the file is overwritten with each run
  • The protection of the newest attachments applies only to the UNUSED FILES section. The “DELETE FILE” commands in the STANDALONE UNUSED FILES section are always active.
  • Example content:
// STANDALONE UNUSED FILES

DELETE FILE 0.zip


// UNUSED FILES

// mail-ico-facebook.gif
DELETE FROM sfiles WHERE id = 19596
DELETE FILE 19596.gif


// MISSING ENTRIES IN 'SFILES' TABLE

// SELECT ng_comment FROM ng_task WHERE id = 2831


// MISSING FILES IN 'NETGENIUM/FILES' DIRECTORY

// SELECT ng_attachment1 FROM ng_crmdokument_history WHERE id = 499 // 22-7 Offre
 

1.4.29. /unusedqueries

The “SqlBackup.exe” program run with the “/unusedqueries” parameter searches for all unused SQL queries stored in the “squerybuilder” table and for each of them generates commands that delete the query together with its conditions, joins, columns, headers and colors. To delete unused SQL queries, it is necessary to call the command “SqlBackup.exe /run file”, where the created log file “UnusedQueries.log” will be inserted as a parameter.

  • A query is considered used if it is bound to a control of an edit form or a view page, to a picker or to a script step, as well as a nested query of an “IN” condition at any depth, a query of a control condition and a query saved as a query template.
  • The output file is a proposal for review – it is advisable to go through it before running it with the “/run” command.
  • Use: “SqlBackup.exe /unusedqueries” followed by “SqlBackup.exe /run UnusedQueries.log”
    Creates the “UnusedQueries.log” file in the “Backup” directory of the NET Genium installation; the file is overwritten with each run

1.4.30. /unusedscripts

The “SqlBackup.exe” program, run with the “/unusedscripts” parameter, deletes from the “sngscript” table all script steps that have neither an edit form nor a button filled in. Steps that refer to a non-existent edit form or button remain. The deletion takes place immediately, without further confirmation and without a log file.

  • Use: “SqlBackup.exe /unusedscripts”

1.4.31. /export

The “SqlBackup.exe” program run with the “/export” parameter (abbreviated “/e”) exports the current database to a ZIP archive in the “Backup” directory. System tables and the tables of all edit forms, including the change history tables, are exported. After starting, the program offers an export profile:

  • “1) Database” – data of all tables.
  • “2) Database and file attachments” – data of all tables and the entire “Files” directory with file attachments.
  • “1b)” and “2b)” – the same as profiles 1 and 2, but tables with more than 10,000 records are saved into separate XML files next to the archive instead of into the archive.
  • “3) Database structure (merge)” – the structure of applications intended for merging with another NET Genium installation using the “/import” parameter. System tables (portal model, user settings) are exported including data, edit form tables only as an empty structure. Of the file attachments, only files inserted into “RichText” controls are included. Tables with instance settings and operational data (NET Genium settings, allowed IP addresses, MCP tokens, logged-in users, user group membership, usage statistics and synchronization settings) are not exported.
  • Before the export, profile 3 permanently deletes redundant records from the “scolumns_history”, “sviewfields_history” and “sngscript_history” tables – of consecutive changes of the same control or script made by one user on one day, only the last one remains.
  • The “Templates” directory is always part of the archive. An archive with the same name is overwritten.
  • Details
    • If the database version differs from the NET Genium version for profile 3, the program asks whether to continue.
    • Files larger than 1 GB are not inserted into the archive – attachments over 1 GB are skipped, and a data file of this size remains in the “Backup” directory next to the archive.
  • Use: “SqlBackup.exe /export [profile]”
    Creates the “yyyy-mm-dd-database_name.zip” file in the “Backup” directory. If the profile (1, 2 or 3) is specified as a parameter, the menu is not displayed, the file name does not contain the date and the program does not wait for the “enter” key to be pressed after completion

1.4.32. /import

The “SqlBackup.exe” program run with the “/import” parameter (abbreviated “/i”) imports an archive created with the “/export” parameter into the current database. The archive is selected from the list of ZIP files in the “Backup” directory; XML files of large tables saved next to the archive are loaded automatically. The program offers an import profile:

  • “Database” – deletes all NET Genium tables in the current database and recreates them with the data from the archive. File attachments are not transferred.
  • “Database and file attachments” – additionally deletes all files in the “Files” directory and replaces them with the attachments from the archive.
  • “Database structure (merge)” – takes over the structure of applications (portal model) from the archive and keeps the data of the current database. Edit form tables that exist in both versions remain including their data and only their structure is adjusted; tables that the archive does not contain are deleted (their data is saved to the “Temp” directory beforehand). NET Genium settings, allowed IP addresses, MCP tokens, user group membership and usage statistics remain unchanged; synchronization settings are kept from the current database.
  • “Database structure (merge test)” – a trial merge: commands changing the database are not executed, but are written into the “Backup\SqlBackup.sql” file; differences in the structure of tables are written into the “Backup\SqlBackup.htm” file.

During the merge, the program further asks what to do with user settings (portlets, favorite items, view table settings, filters):

  • “User settings from old version” – the settings from the current database are kept; the prerequisite is that all controls exist in the archive with the same ID.
  • “User settings from new version” – the settings from the archive are taken over; the prerequisite is that all users exist in the current database with the same ID.
  • “Delete user settings” – the settings are deleted. Only the portlets, favorite items and home page settings of the users with ID 1 and 2 and the filter templates of the Administrator user (ID 1) are kept, in the version from the archive.

Further behavior:

  • If the “Templates” directory contains print templates, the program asks whether to keep the templates of the current installation (“Templates from old version”), or to take over the templates from the archive (“Templates from new version”).
  • If the version of the current database is lower than the version of the installed NET Genium (the “Config\Version.txt” file), i.e. if the database has not yet been updated after a NET Genium update, the program refuses both the merge and the merge test and ends before it deactivates NET Genium. The database is updated when NET Genium starts; NET Genium deactivated by the “UnderConstruction.txt” file does not update it (see the “Deactivate.exe” chapter).
  • If the structure of the system tables in the current database differs from the structure known to the “SqlBackup.exe” program, the merge deletes all system tables and creates them again with the new structure; their data is transferred through the “Temp” directory.
  • Details
    • If the NET Genium version in the archive differs from the one in the current database during the merge, the program asks whether to continue.
    • If the “ngef.dll” file is located in the “Backup” directory during the merge, the “NETGenium.MergeDatabase” external function is run before the merge.
    • For some changes of a column's data type, the program asks “Convert data” for the column. An answer starting with the letter “n” skips the conversion of values, and the column may then remain empty in the table and in its history.
    • With the “Database” and “Database and file attachments” profiles, the program does not load XML files of large tables larger than 100 MB during the import of the archive, but only after it is completed, each in a separate “SqlBackup.exe /importxml” process. Tables with at least 10 000 records stored directly in the archive are loaded in the same way – the program first writes them to the “Backup” directory. It asks about deleting the “UnderConstruction.txt” file only after they have finished, and only if none of them ended with an error. If the import of the archive writes an error to the log, even for a single record, it does not load these files – they remain in the “Backup” directory, the program lists them and they can be loaded with the “/importxml” parameter.
    • The “/export” and “/exporttable” parameters write date and time values with the time zone offset of the server's operating system, and the “/import” and “/importtable” parameters convert them to the time zone of the server they run on. When transferring between servers with a different operating system time zone, they are therefore shifted by the difference between the time zones.
  • For the duration of the import, NET Genium is deactivated by the “UnderConstruction.txt” file in the “Config” directory; after successful completion, the program asks whether to delete it. At the end of the import, the web application is restarted.
  • Use: “SqlBackup.exe /import”
    Creates the “SqlBackup.log” file in the “Backup” directory

1.4.33. /importtasks

The “SqlBackup.exe” program run with the “/importtasks” parameter imports NET Genium scheduled tasks into the Windows Task Scheduler from an XML file that is created during the server backup.

  • Only tasks in the “NETGenium” or “NET Genium” folder of the Task Scheduler (including its subfolders) are imported; other tasks are skipped.
  • Each task is set to run under the “SYSTEM” account with the highest privileges, regardless of the account specified in the file.
  • An existing task with the same name is overwritten.
  • Details
    • At the end, the program displays the number of imported, skipped and failed tasks.
  • Use: “SqlBackup.exe /importtasks [scheduledtasks.xml]”
    If the file is not specified, the “scheduledtasks.xml” file in the current working directory is used

1.4.34. /importxml

The “SqlBackup.exe” program run with the “/importxml” parameter imports records from the XML file specified by the “file” parameter, which must be located in the “Backup” directory, into an existing table of the current database. It is typically run by the “/import” parameter for large tables.

  • The table identifier is derived from the file name; if the name contains hyphens (e.g. “2026-10-06-database-ng_table.xml”), the part after the last hyphen is used.
  • Records are only inserted into the table; existing records are not deleted.
  • The progress is saved into a file with the “.ini” extension next to the XML file; an interrupted import continues after the last imported record when run again.
  • After a successful import, the XML file is deleted, but only if its name does not contain a hyphen.
  • Details
    • The command is not in the command menu and can only be run with a parameter.
    • The progress is written into a file with the name of the XML file and the “.log” extension in the current working directory, not in the “Backup” directory; the file is overwritten with each run. If the command is run by the “/import” parameter, this is the working directory in which the import was started.
  • Use: “SqlBackup.exe /importxml file”

1.4.35. /loginstats

The “SqlBackup.exe” program run with the “/loginstats” parameter goes through the files in the directory specified by the “directory” parameter (typically the “Logs” directory) and lists the lines about user logins from them. The program offers two profiles:

  • “Valid logins with username and password” – successful logins with a username and password.
  • “Invalid logins” – failed login attempts (lines with the text “failed to log on”).
  • If the directory is not specified, the current working directory is searched. If it is the “Backup” directory and a “Logs” directory exists next to it, the program offers a choice between them.
  • Details
    • All files in the directory are searched regardless of their extension, without subdirectories.
    • The “Invalid logins” profile does not list rejected logins that NET Genium writes with a different text – a login with a username and password from an IP address other than “127.0.0.1” when the “DenyLogin.txt” configuration file exists, a login of the “Administrator” account with an empty password from an IP address other than “127.0.0.1” when a password strength is set and entering an invalid login code.
  • Use: “SqlBackup.exe /loginstats [directory]”
    Creates the “loginstats.log” file in the current working directory; the file is overwritten with each run

1.4.36. /updatearchive

The “SqlBackup.exe” program run with the “/updatearchive” parameter archives selected records and file attachments into the “Archive” directory of the NET Genium installation (another location can be specified by a path saved in the “Archive\Archive” file). Which records are archived is determined by the “Config\UpdateArchive.txt” file:

  • A line in the form “SELECT * FROM table [WHERE ...]” determines the archived records of one table. A query with a “WHERE” condition moves the records (MOVE), a query without it copies them (COPY); the mode can also be determined by the “COPY:” or “MOVE:” prefix. Other lines define foreign keys, lines starting with “//” are comments.
  • The program finds related tables (parent, referencing and tree links) by itself and repeatedly excludes from the selection the records whose link leads to a record outside the selection.

The program offers these profiles:

  • “Analyze tables” and “Analyze tables and file attachments” – analysis only: the numbers of records, or the size of attachments, are written into the log.
  • “Copy tables to ...” – saves the data of the tables including the change history into XML files in the “Archive” directory, including the list of attachments; neither the database nor the attachment files are changed.
  • “Move tables and file attachments to ...” – saves the tables as the previous profile does and copies the attachments into the “Archive\Files” directory. It then deletes the records in the MOVE mode from the tables, from their history and from the “sfiles” table, and deletes their attachments from the attachment directory. The “DELETE” commands can be executed immediately, or written into the “Backup\UpdateArchive.sql” file and run later with the “/run” parameter.
  • “Import tables from ...” – imports all XML files from the “Archive” directory into the current database and deletes the successfully imported files. The “susers”, “susers_rights”, “susergroups”, “srightsgroups” and “srightsgroups_rights” tables are completely emptied before the import; in the other tables, records with the same ID are overwritten.
  • “Move file attachments from ... to ...” – moves the attachments from the “Archive\Files” directory back to the attachment directory. A file that already exists in the target is not overwritten.
  • “Track record” – analysis with tracking of one record of a specified table; it writes into the log why the record was included in the selection or excluded from it.
  • The copy and move profiles require that the “Archive” directory contains no files.
  • Use: “SqlBackup.exe /updatearchive”
    Creates the “UpdateArchive.log” file in the “Backup” directory

2. “bin” directory

2.1. ApplicationManager.exe

A program designed for importing and exporting applications and application groups to and from NET Genium. The export is performed into an encrypted “nga” file (applications) or “ngg” file (application groups), which can be large (even several GB) depending on the size of the application and the amount of user data. “ApplicationManager.exe” is used to export or import these large applications – if the export or import was performed from the NET Genium web interface, it could happen that the IIS web server cannot accept (upload) such a file, or subsequently process it, i.e. import the application. For this reason, it is much more efficient to use the “ApplicationManager.exe” application.

  • The program offers the same options as import and export in NET Genium – data, attachments, data ownership, record history, rights and bindings to other applications. A detailed description is provided in the separate guide Import and export of applications.
  • The program always imports an application as a new one into the application group selected in its window. It cannot update an existing application – updating is available only in the NET Genium web interface.
  • After an import of an application or application group, the program restarts the NET Genium web application so that the imported objects are displayed.
  • Details
    • The program restarts the web application even when some records cannot be imported and the application remains created without them.
  • The program connects to the database directly, without logging in, and works with the permissions of the Administrator user (ID 1). It may therefore be run only by the server administrator. In the program, the “I am the owner of the imported data” option sets the Administrator user as the owner of the imported records.

2.2. FileUpload.exe

The program is located in the “Config\Tools” directory, and the “FinishUpdate.exe” program copies it to the Windows system directory with each update.

A program designed for regular uploading of individual files or entire directories to a remote server on which NET Genium with the “FileUpload” application is installed. This application consists of a file transfer interface (this interface is a standard part of every NET Genium), as well as the “FileUpload Document” edit form and the “FileUpload Documents” view page. Neither the edit form nor the view page is a standard part of NET Genium, so they need to be imported first. For this purpose, the file “FileUpload.nga” is prepared in the “Install” directory, which can be imported into any application group as a normal application.

Each individual file or the entire directory uploaded to the server must have a separate profile created in NET Genium – an entry in the “FileUpload Document” table. This profile includes the name of the transferred file, the password for its transfer and the target directory on the server. The profile can also specify that a ZIP archive is unpacked after transfer, where the uploaded file (for an unpacked archive, each unpacked file) is additionally copied, to which e-mail addresses the uploaded file is sent as an attachment, and into which ZIP archive on the server the uploaded file is added (the modified archive is saved to the target directory). An entire directory is transferred to the server by first packing it into a “zip” archive, which is then transferred to the server – the archive must have the appropriate profile created, in which it is selected that the file is unpacked after the transfer to the server.

When the “FileUpload.exe” program is run in any directory on the disk, the contents of the current directory are compared with the profiles in the “FileUpload Document” table whose transfer password matches the password entered. The program offers for transfer only files that have a profile created by their name in NET Genium and are newer than the file on the server (a ZIP archive that is to be unpacked after transfer only if it was changed in the last 30 minutes), and asks for confirmation of the transfer. With the “/Q” parameter, it does not ask for confirmation and does not wait for the Enter key even when there is nothing to transfer or the transfer ends with an error – without it, the program waits for the Enter key in these cases and ends immediately after a successful transfer.

“FileUpload.exe” requires a remote NET Genium URL and a file transfer password each time it is run.

These two parameters can be passed to the program in three ways:

  • by calling the program “FileUpload.exe” with two parameters “URL” and “Password”, which are separated by a space (even the password itself can contain spaces), eg “FileUpload.exe https://www.netgenium.com/netgenium password transfer”,
  • by creating the text file “FileUpload.ini” in the root directory of one of the disks “C:” to “Z:”, which on the first line contains the URL of the remote NET Genium, and on the second line the password for the transfer (the first file found in the alphabetical order of the disks is used),
  • by manually entering the URL and password for the transfer directly in the running program “FileUpload.exe” (which is very impractical when running the program frequently).
  • Details
    • The file transfer interface is not available in NET Genium Online; the remote NET Genium can only be a full installation.
    • On an installation in demo mode (the “Demo.txt” file), the file transfer interface rejects the upload.
    • The program compares with the profiles also the files in the subdirectories of the current directory. A file from a subdirectory is offered for a profile whose target path (target directory and file name) ends with the same relative path – for example the file “subdirectory\archive.zip” for a profile of the file “archive.zip” with a target directory ending with “\subdirectory”. If several newer files match one profile, only one of them is offered; files from subdirectories take precedence.
    • Profiles that unpack a ZIP archive after the transfer, or whose target directory or copy target is the “bin” or “update” directory or lies inside it, are offered by the program only from IP addresses from which the NET Genium settings allow such an upload. A detailed description of allowed IP addresses is provided in the separate guide NET Genium settings.
    • The copy of an unpacked archive saves all unpacked files directly into the copy target, without subdirectories; files with the same name from different subdirectories overwrite each other.
    • A file transfer run returns exit code 0 if all offered files are uploaded, otherwise 1 – also when there is nothing to transfer (“All files are up-to-date.”), when the transfer is not confirmed or when it ends with an error. The “LogService.exe” program with the “ErrorLevel” parameter therefore does not log even a run in which there was nothing to transfer.

The “FileUpload.exe” program can package the entire directory into a “zip” archive using the “-Z” parameter, followed by the archive name without a space after “-Z” and also without the “.zip” extension at the end. “FileUpload.exe” packages one of the following directories based on the current working directory:

  • the entire parent directory if the current working directory is the “bin” directory, or
  • only the current working directory if it is not the “bin” directory.

The rule for the “bin” directory applies only to an archive name without a path. If the archive name contains a colon (a full path, e.g. “C:\Temp\archive”), the archive is saved to the specified location and the current directory is packed, even if it is a “bin” directory. An archive with a name without a path, on the other hand, does not contain the source and configuration files of a web project (the “.bat”, “.config”, “.cs”, “.csproj”, “.db”, “.log”, “.resx”, “.sitemap”, “.sln”, “.suo”, “.user”, “.webinfo” extensions) or SVN conflict files with the “.r” extension followed by a number; with a full path, these are packed as well. The “.agents”, “.claude”, “.codex”, “.svn”, “.vs”, “.vscode”, “ai-model”, “catalog.wci”, “files”, “logs”, “obj” and “packages” directories are always omitted. The “/E” parameter followed without a space by a file path relative to the packed directory excludes the file from the archive; the “/I” parameter written in the same way includes in the archive a file that the program would otherwise omit; a file in an always omitted directory cannot be included this way, the omission of such a directory is cancelled by the “/I” parameter followed by its path (without a mask), and the files in it are then subject to the other omission rules. Instead of a file path, “directory\*.*” (all files of the directory including subdirectories) or “directory\*.extension” (files with the given extension directly in the directory) can also be entered.

Details
  • Regardless of a path in the archive name, the files “aggregatestatistics.ini”, “agents.md”, “ai-model.json”, “aspose.cells.xml”, “aspose.words.xml”, “bouncycastle.crypto.xml”, “claude.md”, “evohtmltopdf.xml”, “iirf.ini”, “netgeniumconnection.xml”, “o2s.components.pdf4net.xml”, “sitemap.xml”, “sitemap-cs.xml”, “sitemap-en.xml”, “system.runtime.compilerservices.unsafe.dll”, “system.threading.tasks.extensions.dll” and “variablesymbols.ini” are always omitted (regardless of letter case); they can be included with the “/I” parameter.

The “FileUpload.exe” program can also automatically delete the uploaded files. To enable this function, the “/D” parameter must be selected. The files are deleted only if all offered files were uploaded successfully; if the upload of any of them fails, nothing is deleted. In combination with the “-Z” parameter, the program deletes all source files that were packed into the archive; the archive itself is kept.

  • Examples:
FileUpload.exe https://www.netgenium.com/netgenium password for transmission
FileUpload.exe/Zarchivename https://www.netgenium.com/netgenium password for transmission
FileUpload.exe/Zarchivename

2.3. LogService.exe

Program designed for logging successfully executed programs/services to the database table “ng_sluzbawindows”. The program is mainly used for scheduled batch file execution using scheduled Windows tasks. The service name is defined by the “ServiceName” parameter – under this name the service is logged into the database. The default interval after which the service should start again is set by the “IntervalInMinutes” parameter. It is possible to pass the text string “%errorlevel%” to the optional parameter “ErrorLevel”, which is a variable available in any “bat” file and which returns the current error code. If “LogService.exe” detects that this code is anything other than 0, it does not log the service. The next run time is calculated as the current time increased by “IntervalInMinutes”.

  • The NET Genium installation into whose database the program writes is determined by the location of the program: it is the directory in which the program is located, and if the program is located anywhere under the “bin” directory, the directory that contains “bin”. The program reads the database connection string from the “Config\ConnectionString.txt” file of this installation.
  • The program writes nothing if the “Config\UnderConstruction.txt” file exists in the installation or if the database does not contain a form with the “ng_sluzbawindows” table.
  • Use:
LogService.exe ServiceName IntervalInMinutes [ErrorLevel]
  • Example “bat” file:
xcopy /D /H /E “D:\inetpub\wwwroot\netgenium“ \\NAS-NETGenium\Files
LogService.exe BackupFiles 1440 %errorlevel%

2.4. OnlineUsers.exe

A program designed to evaluate the number of logged-in users in the NET Genium databases on the given server. It lists the databases with at least one license-consuming login active within the last hour and, for each of them, the number of such logins and the time of the last activity. The number is the sum of the logins consuming a standard and an external license; a user logged in from several IP addresses is counted once for each of them, and a user consuming both licenses is counted twice.

  • Creates the “OnlineUsers.log” file in the “Logs” directory if the program is run from the “bin” directory, otherwise in the current working directory, and opens this file at the same time
  • Details
    • The program looks for databases only in the local MSSQL instances (instances registered in the system registry, “(local)” and “(local)\SQLEXPRESS”) and in the “E:\Firebird”, “D:\Firebird” and “C:\Firebird” directories. If it is located in the “bin” directory, it adds the database of the NET Genium in which it is located and, for a Firebird database, also the other databases in its directory.
    • The program connects to MSSQL databases with the Windows account under which it is run, to Firebird databases with the “SYSDBA” account and the default password “masterkey”, and with the credentials from the “ConnectionString.txt” file only to the database of the NET Genium in which it is located, and only if it has not already found it among the databases of the MSSQL instances and Firebird directories.

2.5. ResendEmlFiles.exe

A program designed to search for all “eml” files in the “SMTP” directory, and then send them using an SMTP server. E-mails are saved in this directory automatically if there is any problem with sending them from the NET Genium environment, eg due to high SMTP server load or poor connectivity.

  • After a successful e-mail, the corresponding “eml” file is deleted from the “SMTP” directory.
  • If the e-mail(s) cannot be sent again by “ResendEmlFiles.exe”, they will remain unchanged in the “SMTP” directory, and an e-mail will be sent to the portal administrator with a list of the files that failed in that run. The e-mail is sent on every run of the program, and only when a valid administrator e-mail address is filled in the NET Genium settings; messages without a sender or without recipients and messages the program has already given up on are not listed in it.
  • Each message is sent first through SMTP server 1 and, if it fails, through SMTP server 2. If no SMTP server is set up, the program does not send the messages.
  • Sending one message is attempted at most 48 times regardless of the error the individual attempts end with; for permanent errors (for example invalid syntax of the recipient address – “Bad recipient address syntax”) only once. The attempts are recorded in the “ResendEmlFiles.errors” file in the “SMTP” directory.
  • Details
    • The program sends a message with its content unchanged, only removing the envelope headers “X-Sender” and “X-Receiver”; it takes the recipients from the “X-Receiver” header, because only that header also carries the blind carbon copy addresses.
    • The program packs unsent messages from past years into ZIP archives in the “SMTP” directory (separately messages with an error, without a sender, without recipients and too big ones) and deletes the original files. It packs only messages it has given up on and messages without a sender or recipients, and only for a year that ended more than a month ago; if the archive for that year already exists, the files stay.
    • On every run the program also packs the “.log” files from the log directory of the given NET Genium that have a year between hyphens in their name (for example the monthly “SMTP-year-month.log” logs), for years that ended more than a month ago (at most ten years back). The ZIP archives are created in the same directory by the log name and the year – for example the files “SMTP-2025-01.log” to “SMTP-2025-12.log” are packed into the archive “SMTP-2025.zip” – and the program deletes the original files. If the archive already exists, the files stay. Log files without a year in their name, for example “System.log”, stay unchanged.
    • If NET Genium is deactivated (the “UnderConstruction.txt” file) or is being updated, the program sends no message and packs no logs; it only writes a warning into the “Warnings.log” log.

It is common to run “ResendEmlFiles.exe” as a scheduled Windows task. The scheduled task can be created either manually or automatically using the “Setup.exe” program, or by running the “ResendEmlFiles.exe” program with the “-task” parameter.

The program “ResendEmlFiles.exe” also makes it possible to search for and send all “eml” files from all NET Genium located on the server. As part of resending email messages, it is possible to send “eml” files from all NET Genium at once or only from selected NET Genium. Definitions from which NET Genium will be resent “eml” files are given in the configuration file “ResendEmlFiles.exe.config”, which is located in the same directory as “ResendEmlFiles.exe”.

<configuration>
<appSettings>

<add key="ngdirs" value="D:\inetpub\wwwroot"/>
<add key="ngdir" value="E:\inetpub\wwwroot\netgenium1" />
<add key="ngdir" value="E:\inetpub\wwwroot\netgenium2" />

</appSettings>
</configuration>

The “ngdirs” parameter specifies the directory on the disk where multiple NET Genium are stored. “ResendEmlFiles.exe” will find all NET Genium in this directory, and will try to resend all “eml” files from the “SMTP” directory. Except for those who have the file “SkipResendEmlFiles.txt” located in the “Config” directory (it does not matter its content).

The “ngdir” parameter specifies the directory on the disk in which one specific NET Genium is stored, from the “SMTP” directory of which the “ResendEmlFiles.exe” program will try to resend all e-mail messages. The program skips a NET Genium specified this way as well if it has the “SkipResendEmlFiles.txt” file located in the “Config” directory.

The “ResendEmlFiles.exe” program must be placed together with other required files in a separate directory on the disk, eg in the “D:\ResendEmlFiles” directory. The following files are a necessary part of the “ResendEmlFiles” directory for the correct functionality of resending “eml” files from multiple NET Genium:

  • “ResendEmlFiles.exe”,
  • “ResendEmlFiles.exe.config” and
  • “NETGeniumConnection.dll”.

In this mode the program runs the own “bin\ResendEmlFiles.exe” program of each NET Genium found and writes the list of all processed NET Genium instances into a daily log file in the “Logs” directory next to the program.

  • If the program of the given NET Genium finished, the log file shows “OK” next to the path to the given NET Genium. The result of sending individual messages is in the log of that NET Genium.
  • If the NET Genium contains the “SkipResendEmlFiles.txt” file in the “Config” directory, the log file shows “SKIP” next to the path to the NET Genium – regardless of whether it was found due to the “ngdirs” parameter or specified by the “ngdir” parameter.

2.6. Restart.exe

Program designed to restart NET Genium. This is accomplished by creating or deleting a “Restart.txt” file in the “bin” directory – it takes advantage of the IIS feature that any change to the contents of the “bin” directory will result in a restart of the web application.

  • The program works with the “Restart.txt” file in the current working directory. It must therefore be run from the “bin” directory; in a scheduled task, the “Start in (optional)” field must be filled in with the path to the “bin” directory.
  • With the “/J” parameter, the program does not wait for a key to be pressed after completion.

2.7. RunningQueries.exe

A program designed to evaluate a list of currently processed database queries in the databases on the given server. It lists running database queries, running NET Genium scripts, connections to the databases and, for each query, a suggested command for terminating it; it does not terminate any query itself.

  • Creates the “RunningQueries.htm” file in the “Logs” directory if the program is located in the “bin” directory, otherwise in its own directory, and opens this file at the same time
  • Details
    • For MSSQL, the program lists the queries and connections of the whole instance, i.e. also from databases that do not belong to NET Genium; the table of connections contains all sessions of the instance including system and idle ones, each with a suggested “kill” command. For Firebird, it lists the statements and connections of each database including idle ones and shows their state; it omits only its own connection and the system connections “Cache Writer” and “Garbage Collector”. On both database servers, the suggested termination command terminates the whole connection from which the query comes (for MSSQL, the “kill” command terminates the whole session).
    • The program looks for databases and connects to them in the same way as the “OnlineUsers.exe” program; access to the state views of the MSSQL server is required for the account with which the program connects to the database – the Windows account under which it is run, and for a database connected with the credentials from the “ConnectionString.txt” file, the account specified in that file.
    • The table of running scripts contains the scripts of buttons of edit forms and view pages, the scripts of the events before saving and before deleting a record, and the scripts run by moving an event in “TimeTable” and “Planner” controls; the scripts of the other form events and test runs in the script designer are not in it. Each script appears in it at most once regardless of the number of concurrent runs, and it disappears from it as soon as any of the runs ends.

2.8. RunScript.exe

A program designed to run a script specified using a control ID – a button located solely on the view page. The optional parameter “UserID” represents the ID of the user under whose login name the script will run. If the optional parameter is not specified, the script will run under an anonymous user and the rights are not evaluated. If no user with the specified ID exists or the value is not a number, the program does not run the script and returns exit code 1. The program always runs the steps of the button script – regardless of whether the “Run script” option is checked and of the command type of the button; it does not perform the button command itself. The button script runs in a single transaction, which the “COMMIT()” server function can commit in the middle of the script and begin a new one; scripts run by the “SCHEDULESCRIPT” server function run only after the button script has been committed, each in its own transaction. The program returns exit code 0 on success and 1 on an error, including a script that does not exist or is empty and an ID of a control that is not a button on a view page. It also returns exit code 1 without running the script if NET Genium is deactivated (the “UnderConstruction.txt” file) or is being updated – in such a case it writes the reason to the “Warnings” log.

  • Use: “RunScript.exe <ID> [<UserID>]”

The “RunScript.exe” program is mainly used in scheduled tasks. The scheduled task can be created either manually or using the “Setup.exe” program, which automatically creates a scheduled task with the following parameters based on the specified control ID:

  • in the “NET Genium” folder,
  • with the name of the scheduled task, which is derived from the name of the button,
  • at the specified time – the default time is set to “06:00”,
  • optionally with set repetition twice per hour – at 30 minute intervals for 18 hours.
  • When creating a scheduled task manually, the “Program or script” field must contain the full path to the “RunScript.exe” program on the computer disk, the “Add arguments (optional)” field must contain the control ID and optionally a space and user ID. The “Start in (optional)” field does not need to be filled out.

2.9. Setup.exe

A program designed to install NET Genium, which allows:

  • Create a virtual directory
  • Authorize the application pool identity (or the NetworkService account) to write to the NET Genium directory
  • Create a database
    • Firebird
    • MSSQL
  • Authorize the application pool identity (or the NetworkService account) to access the MSSQL database – the identity is granted the “sysadmin” role
  • Create scheduled task for BackupServer.exe (server backup)
  • Create scheduled task for SqlBackup.exe (database backup) – the task is created without a backup target, so every day it saves a new file to the “Backup” directory that is not deleted; it is advisable to add a target with a variable (for example #dayofweek#) in the “Task Scheduler” to the “Add arguments (optional)” field
  • Create scheduled task for FileBackup.exe (attachments backup) – the task is created without the mandatory parameter with the target backup directory, which must be added in the “Task Scheduler” to the “Add arguments (optional)” field
  • Create scheduled task for Update.exe (update)
  • Create scheduled task for ResendEmlFiles.exe
  • Create scheduled task for RunScript.exe
    • “Setup.exe” is the recommended method for creating scheduled tasks associated with the execution of button scripts located on view pages. The program looks up the entered ID only among the controls of view pages, the same as “RunScript.exe”: it rejects the ID of an edit form button, or – if the ID matches the ID of a button on a view page – schedules that view page button. The task is named after the button found, so its name can be used to verify that the correct button is scheduled.
    • In the dialog of the “Setup.exe” program there are input fields for
      • Button ID,
      • time of the scheduled task run,
      • and the “2x/h” checkbox, which defines that the scheduled task will be run periodically 2x per hour for 18 hours.

Scheduled tasks created by the “Setup.exe” program can also be manually configured directly in the “Task Scheduler”:

  • All scheduled tasks are created in the “NET Genium” folder, which either already exists or is created by “Setup.exe”
  • Scheduled tasks are set to run in the context of the user account “SYSTEM” with the highest privileges

2.10. StartSynchro.exe

A program designed to send the database table synchronization queue to the linked NET Genium installations. The program sends the queue only if the “DenyStartSynchro.txt” file is located in the “Config” directory – otherwise the web application sends the queue by itself and the program only displays a message. If the “DenySynchro.txt” file is located in the “Config” directory, the program sends nothing. It is typically run by a scheduled task.

  • Before sending, the program releases a synchronization lock older than 2 hours; with the “/reset” parameter, it releases the lock regardless of its age.
  • Details
    • The program returns exit code 1 if sending cannot be started (for example when another sending is in progress) or if reading the queue fails when selecting the next change to send; otherwise it returns 0. It also returns exit code 1 without sending if NET Genium is deactivated (the “UnderConstruction.txt” file) or is being updated.
    • A failed transfer of a change to a linked installation does not change the exit code – the error is written to the “Synchro-year-month.log” log file, possibly also to the “ssynchro” table, and further changes in the queue are not sent until this transfer succeeds or the change is deleted from the queue.
  • A single run of the program stops sending after 10 minutes; the rest of the queue is sent by the next run.
  • Use: “StartSynchro.exe [/reset]”

A detailed description of synchronization is provided in the separate guide Edit form.

2.11. Update.exe and FinishUpdate.exe

The “Update.exe” program is intended for updating NET Genium to its latest version. Automatically updates to:

  • latest full version or
  • the latest test version, if the “Tester.txt” file is present in the “Config” directory (it does not matter its contents).

The file with the latest version of NET Genium is always first searched in the “Update” directory – “netgenium4.zip” for the full version and “netgenium4t.zip” for the test version. If this file exists in the “Update” directory, it is considered an available update without comparing versions and is deleted after use. If it does not exist in the “Update” directory, it will be automatically downloaded from the NetGenium website.

At every check for a new version (that is, even when NET Genium is up to date), the “Update.exe” program contacts the NetGenium license server and sends it, among other things, the MAC address and the database name stated in the license key, the encrypted license key, the name of the update archive, the database type and the computer name. Outgoing access to “www.netgenium.com” therefore has to be allowed on the server – if the license server cannot be contacted, the update is not performed. The license server may refuse the update – the update is then not performed and “Update.exe” reports the reason (updates are denied for the license key, the license server does not recognize the license key or the license key does not contain the MAC address of the server). The update is not performed either when the license server returns an unexpected response. The exception is an update from an archive prepared in the “Update” directory, which proceeds regardless of the license server. The license server may also change the number of licenses and other data of the license key including its validity; “Update.exe” writes the change to the “Config\license.txt” file. When the license server cannot be contacted, the same data are sent by e-mail to NetGenium through the SMTP server set in NET Genium, if one is set.

It is also possible to run the “Update.exe” program as a scheduled Windows task, thus ensuring a regular daily update of NET Genium, typically performed at night. However, “Update.exe” must be run by the task scheduler with the “-j” parameter – this is a fully automated update that does not require user confirmation. The scheduled task can be created either manually or automatically using the “Setup.exe” program, or by running the “Update.exe” program with the “-task” parameter.

rem Running an automated update that does not require user confirmation
Update.exe -j
rem Automatic creation of a scheduled task
Update.exe -task
Details
  • The “Update.exe” program with the “-j” parameter returns exit code 1 when the license server cannot be contacted (unless the update archive is prepared in the “Update” directory) or when the run ends with an error (for example in the check of the license key, the download or the unpacking of the archive, or when starting the “FinishUpdate.exe” program); the error is written to the “Update.log” file. In all other cases it returns 0 – even when the license server refuses the update or returns an unexpected response (such a run can be recognized only by a record containing “ERROR” in the “Update.log” file), and even when the “FinishUpdate.exe” program, which runs separately and writes its errors to the “FinishUpdate.log” file, fails to replace the files. The “LogService.exe” program with the “ErrorLevel” parameter therefore logs such runs as successful.

The update does not overwrite the “ngef.dll”, “ngef.js”, “o2s.components.pdf4net.dll” and “o2s.components.pdf4net.xml” files nor images whose name starts with “ic_” and ends with the “.png” or “.svg” extension, if they already exist in NET Genium. A new version of the “ngef.dll” library can be deployed by preparing it in the “Update” directory (see below).

An update to a new version replaces the “Web.config” and “bin\RunScript.exe.config” files with the default files of the new version, so manual changes to these files are lost. The settings from the configuration files are applied to the “Web.config” file again, and the assembly binding redirects from the “bin\ngef.dll.config” file are added to both files again (see the NET Genium settings guide).

When the update is complete, the “FinishUpdate.exe” program starts automatically, which:

  • updates the “Web.config” file in the NET Genium root directory according to the various settings located in the configuration files,
  • copies the “FileUpload.exe” program to the Windows system directory – this ensures that the program can be run from the command line without having to specify a path to it,
  • deletes the old “Update.exe” and the “NETGeniumConnection.dll” library, and replaces them with the new versions located under the provisional names “Update.new” and “NETGeniumConnection.new”,
  • deploys the “ngef.dll”, “ERP.dll” and “OCR.dll” libraries to the “bin” directory if they are prepared in the “Update” directory,
  • copies the custom favicons “favicon.ico”, “favicon-16x16.png”, “favicon-32x32.png” and “favicon-96x96.png” to the NET Genium root directory if they are prepared in the “Update” directory – unlike the libraries, it leaves them in the “Update” directory, because an update to a new version overwrites the favicons in the root directory with the default NET Genium favicons, so the custom favicons are restored after every update,
  • Details
    • after an update to a new version compares the last-write times of the “LogService.exe”, “NETGenium.dll”, “NETGeniumConnection.dll”, “ResendEmlFiles.exe”, “RunScript.exe”, “Setup.exe” and “Update.exe” files in the “bin” directory. When they differ by more than 2 minutes, some files could not be overwritten – the program reports that the update failed and deletes the “Version.txt” file in the “Config” directory, so the update is performed again at the next run of the “Update.exe” program. When any of these files is older than 10 minutes, the program reports that the update may have failed. In a manual update the report is displayed in a window; in an update with the “-j” parameter and in a bulk update it is sent to the service e-mail address (see the NET Genium settings guide), if it is filled in together with the SMTP server; in an update with the “-j” parameter it is also written to the “Update.log” file; in a bulk update the update error is written to the daily log file next to the “Update.exe” program.
    • In a bulk update, the “FinishUpdate.exe” program in the “bin” directory of the individual NET Genium instances is not run – the “Update.exe” program performs the same steps itself.

When no new version is available, or it cannot be verified because of the license server, the “Update.exe” program still deploys the “ngef.dll”, “ERP.dll” and “OCR.dll” libraries prepared in the “Update” directory. When there is nothing to deploy, it applies the settings from the configuration files to the “Web.config” and “bin\RunScript.exe.config” files; a file is overwritten only when its content changes.

Details
  • The libraries prepared in the “Update” directory are deployed even when the license server refuses the update, returns an unexpected response or cannot be contacted. A manual update then also reports the reason why the new version was not downloaded, a bulk update writes it after the “OK” record as a record starting with “ERROR”, and an update with the “-j” parameter writes it to the “Update.log” file.

NET Genium updates the database structure to the new version only when it starts, i.e. at the first request to the web application after the update. If the intranet address is filled in the NET Genium settings, this request is sent to it automatically when the update finishes. If NET Genium is deactivated by the “UnderConstruction.txt” file, it starts without connecting to the database, and the database stays in the old version until the file is deleted and NET Genium is opened again (see the “Deactivate.exe” chapter).

Details
  • When the database is not available at the start of NET Genium, NET Genium tries to connect to it again on subsequent requests at most once a minute and updates the database as soon as the connection succeeds.

The second area where the “Update.exe” program can be used is a bulk update of NET Genium, which is located on the server. As part of a bulk update, it is possible to update all NET Genium at once or only selected NET Genium. The definition that will be updated by NET Genium is listed in the configuration file “Update.exe.config”, which is located in the same directory as “Update.exe”.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>

<add key="dir" value="D:\inetpub\wwwroot\www.netgenium.com\Download" />

<add key="ngdirs" value="D:\inetpub\wwwroot" />
<add key="ngdir" value="E:\inetpub\wwwroot\netgenium1" />
<add key="ngdir" value="E:\inetpub\wwwroot\netgenium2" />

</appSettings>
</configuration>
  • The “dir” parameter indicates the path to the directory with the latest versions of NET Genium – to the directory with the “netgenium4.zip” and “netgenium4t.zip” archives and the “version4.txt” and “version4t.txt” files with the version numbers. The “dir” parameter can only be used on the NetGenium production server, where the archives with the new versions are distributed.
  • The “ngdirs” parameter specifies the directory on the disk where multiple NET Genium are stored. The “Update.exe” program finds all NET Genium in this directory and updates it. Except for those who have the file “SkipUpdate.txt” located in the “Config” directory (it does not matter its contents).
  • The “ngdir” parameter specifies the directory on the disk in which one specific NET Genium is stored, which the “Update.exe” program will update.

The configuration file may also contain these parameters:

  • The “url” parameter indicates the address from which the bulk update downloads the archives with new versions and the files with the version numbers instead of the NetGenium web server.
  • The “proxy” parameter indicates the address of the proxy server through which the “Update.exe” program accesses the Internet; it applies to the bulk update, to the manual update and to the update with the “-j” parameter.

The “Update.exe.config” configuration file is created by the “Update.exe” program run with the “/config” parameter. It fills the “ngdirs” parameter with the “inetpub\wwwroot” directory, or the “wwwroot” directory, if it exists on some disk, and adds an empty “ngdir” parameter. When the configuration file already exists, the program ends with an error and does not change the file.

The “Update.exe” program must be placed together with other required files in a separate directory on the disk, eg in the “D:\Update” directory. The following files are a necessary part of the “Update” directory for the correct operation of the bulk update:

  • “FinishUpdate.exe”,
  • “NETGeniumConnection.dll”,
  • “Update.exe.config” and
  • “Update.exe”.

When starting the bulk update, a list of all NET Genium that were listed in the configuration file “Update.exe.config” is written into a daily log file in the “Logs” directory next to the “Update.exe” program (for example “Logs\2026-10-06.log”).

  • If the NET Genium is successfully updated, the log file shows “OK” next to the path to the NET Genium.
  • If the given NET Genium is already current at the time of the update, the log file shows “Up-to-date” next to the path to the given NET Genium.

If the given NET Genium was searched for thanks to the parameter “ngdirs” or “ngdir” and at the same time contains the file “SkipUpdate.txt” in the “Config” directory, the log file states “SKIP” next to the path to the given NET Genium.

When the given NET Genium cannot be updated, the log file shows a description of the error next to the path to it, for example “license.txt NOT FOUND” (the license key is missing) or an entry starting with “ERROR” (for example a rejection by the license server or a missing archive with the new version). At every run of the bulk update, the program deletes the daily log files next to the “Update.exe” program that are older than 6 days.

An update of a single NET Genium (manual or with the “-j” parameter) writes to the “Update.log” file in the “Logs” directory of the given NET Genium. Errors of the update with the “-j” parameter are always written to it, the progress of the update only with logging set to “To disk” or “To database and disk” (see the NET Genium settings guide).

3. “Config\Tools” directory

3.1. Deactivate.exe

The “Deactivate.exe” program deactivates NET Genium – IIS and the NET Genium web application remain running, but any work in NET Genium is prevented. Users are redirected to the “UnderConstruction.aspx” website every time they request to work in NET Genium. Deactivation consists in creating the file “UnderConstruction.txt” in the directory “Config”. The content of the file defines the HTML code that is displayed to the user on the “UnderConstruction.aspx” web page.

The program offers two profiles:

  • “Deactivate all users” – deactivates NET Genium for all users (the “UnderConstruction.txt” file),
  • “Deactivate all users except administrator” – deactivates NET Genium for all users except administrators and the anonymous user (the “UnderConstruction2.txt” file).

Deactivation by the “UnderConstruction.txt” file also stops the database update. NET Genium that starts with this file – typically after an update by the “Update.exe” program – does not connect to the database at all, so the database stays in the old version; instead of the login page, only the unavailability message is displayed, from which this cannot be recognised. The database is updated only when NET Genium is opened for the first time after the file is deleted. The “SqlBackup.exe” program with the “/import” parameter refuses a structure merge over a database that has not been updated.

If NET Genium is to remain unavailable to users for the duration of the update and the subsequent structure merge, the “Deactivate all users except administrator” profile is the suitable one – the “UnderConstruction2.txt” file does not prevent the database update, and the administrator can log in and check that NET Genium has started. For the duration of the import itself, the “SqlBackup.exe” program deactivates NET Genium by the “UnderConstruction.txt” file on its own.

Details

The “UnderConstruction2.txt” file redirects logged-in users without administrator rights only when they open or submit an edit form, a view page or the main page with portlets; other requests of a page opened before the deactivation are not refused. A detailed description of the “UnderConstruction2.txt” file is provided in the separate guide NET Genium settings.

3.2. Activate.exe

The program “Activate.exe” activates NET Genium resp. deletes the “UnderConstruction.txt” and “UnderConstruction2.txt” files from the “Config” directory. After the “UnderConstruction.txt” file is deleted, NET Genium completes the initialization it skipped while deactivated, including the database update, when it is opened for the first time.

3.3. MemoryDumps.txt

The “MemoryDumps.txt” file contains a procedure for analyzing “memory dumps” to troubleshoot application performance or functionality issues.

1) Download and install Debug Diagnostic Tool v2 Update 2
(https://www.netgenium.com/download/DebugDiagx64.msi)
2) Locate memory dumps (C:\Users\abc\AppData\CrashDumps)
3) Run DebugDiag
4) Default Analysis / CrashHangAnalysis
5) Add Data Files
6) Start Analysis

3.4. TracingRequests.txt

The “TracingRequests.txt” file contains the procedure for tracing web requests in IIS and the procedure for tracing requests that NET Genium and the “RunScript.exe” program send to web services (editing the “Web.config” or “RunScript.exe.config” file with output to the “TracingRequests.log” file). The sample below contains the first of the two procedures.

1a) Server Manager/ Add roles and features
2a) Web Server (IIS)/ Web Server/ Health and Diagnostics/ Tracing
3) Run IIS
4) Select top node and click 'Failed request tracing rules'
5) Click Add...
6) All content (*)
7) Status code(s): 401-999
8) Select website and click 'Failed request tracing rules'
9) Edit Site Tracking...
10) Enable

3.5. TuningQueries.sql

The “TuningQueries.sql” file contains a sample list of commands that are used to debug database queries in the “SQL Server Database Engine Tuning Advisor”.

use netgenium
go
SELECT ...
SELECT ...

3.6. TuningQueries.txt

The “TuningQueries.txt” file contains the procedure for debugging database queries in the “SQL Server Database Engine Tuning Advisor”.

1) Run SQL Server Management Studio
2) Right click on the instance name and select 'Reports/ Standard Reports/ Performance - Top Queries by Total CPU Time'
3) Identify top queries with constants in a condition that can be improved with indexes
4) Right click on the background of the report and select 'Print/ Excel'
5) Open printed Excel file
6) Create 'netgenium.sql' file and insert top queries using the following syntax:

use netgenium
go
SELECT ...
SELECT ...

7) Run SQL Server Database Engine Tuning Advisor
8) Click 'Start New Session'
9) Select 'File' as a 'Workload' and browse for 'netgenium.sql'
10) Mark 'netgenium' database
11) Click 'Start Analysis'
12) Analyze 'Recommendations' tab
13) Create new indexes as recommended

3.7. ResponseHeaders.txt

The “ResponseHeaders.txt” file contains sample values of the “Content-Security-Policy” header for web applications that use Google reCAPTCHA or OpenStreetMap map data.

3.8. TracingCertificates.txt

The “TracingCertificates.txt” file contains the procedure for finding invalid server certificates in the HTTP.SYS settings and the procedure for setting up client certificate authentication in the IIS service.

3.9. WSDL.exe

The “WSDL.exe” program is used to create a C# proxy class for calling web services according to their WSDL description.

  • Use: “WSDL.exe [/wcf | /webservice] [/namespace:namespace] [url]”
  • The “/wcf” switch creates a proxy class for a WCF service with the “dotnet-svcutil” tool, which the program installs itself on first use (the .NET SDK must be installed). The “/webservice” switch creates a proxy class for a web service with the “wsdl.exe” tool from the Windows SDK. Without a switch, the program asks for the type of the service.
  • The program creates a file with the proxy class and a helper file with the same name extended with “Spy” in the current working directory.