How To: Verify Configuration¶
The application configuration is stored in appsettings.json. If settings are wrong or the file is corrupted, the application may not work correctly. Use this guide to check the configuration.
Step 1: Open the configuration file¶
- Navigate to
C:\gatekeeper\conveyor\ - Right-click
appsettings.jsonand select Open with > Notepad (or any text editor). - Expected: The file contains JSON configuration data starting with
{and ending with}.
If the file does not exist, the application was not installed correctly. See Application Errors.
Step 2: Check that the JSON is valid¶
Common JSON syntax errors that will prevent the application from loading:
| Error | Example | Fix |
|---|---|---|
| Missing comma | "Setting1": true "Setting2": false |
Add comma: "Setting1": true, |
| Extra comma | "Setting1": true, } |
Remove the trailing comma |
| Missing quote | "Setting1: true |
Add the missing quote |
| Wrong backslash | "Path": "C:\folder" |
Use double backslash: "C:\\folder" |
| Missing bracket | "Array": [1, 2, 3 |
Add closing bracket: [1, 2, 3] |
| Missing brace | "Section": { "Key": "value" |
Add closing brace: } |
Tip: If you have access to the internet, paste the file content into an online JSON validator to quickly find errors.
Step 3: Check key settings¶
Validation Mode¶
Find the ApplicationSettings section and check:
This must be one of: "AV50", "CargillRfid", "CargillSalt", "Chipotle", "Teasdale", "Zfl", "RejectAll"
Hardware Settings¶
Find the HardwareSettings section. Verify:
- At least one device has
"IsEnabled": true - Connection strings have the format
"IP:PORT"(TCP) or"COMx:BAUDRATE"(Serial) - Each device has a unique
Positionvalue
Export Settings (if applicable)¶
Check that the correct export is enabled:
- "EnableMojixExport": true or false
- "EnableMweExport": true or false
- "EnableAisExport": true or false
Import Settings (if applicable)¶
- Teasdale:
"EnableTeasdaleImporter": trueandTeasdaleImportPathis set - CargillSalt:
"EnableNetworkFileImporter": trueandNetworkFileImportPathis set - CargillRfid/Chipotle:
"EnableMatthewsInterface": true
Step 4: Check for database override files¶
Settings in appsettings.json can be silently overridden by database files.
- Navigate to
C:\gatekeeper\conveyor\data\Setting\ - Expected: This folder should be empty (or not exist).
- If files exist here (for example,
Reject-Enabled.json), they override the corresponding setting in appsettings.json.
If settings changes are not taking effect: Delete all files in the Setting\ folder and restart the application.
Step 5: Enable debug logging (for advanced troubleshooting)¶
If you need more detailed log output:
- Open appsettings.json.
- Find the
Serilogsection. - Change the minimum level from
"Information"to"Debug":
- Save the file and restart the application.
- Important: Remember to change it back to
"Information"after troubleshooting. Debug mode generates much more log data.
Step 6: Save and restart¶
After making any changes to appsettings.json:
- Save the file (Ctrl+S).
- Restart the application. See Restart Application.
- Settings are only loaded at startup -- changes do not take effect until restart.
Backup and restore¶
Before making changes¶
Copy appsettings.json to a backup location:
1. Right-click appsettings.json
2. Select Copy
3. Paste it in the same folder -- it will be named appsettings - Copy.json
If changes cause problems¶
- Delete the modified
appsettings.json - Rename the backup copy back to
appsettings.json - Restart the application