System.Net.Sockets.SocketException (10049) – TEKLYNX CENTRAL Error
Target Audience: IT Manager
Article #: 13750
Summary
The TEKLYNX CENTRAL error message, “REST Web Server API: Unhandled exception. System.Net.Sockets.SocketException (10049): The requested address is not valid in its context” occurs when sending a print job through SENTINEL. The cause of this error is relatively simple and this article will guide you through the steps needed to resolve the issue.
Explanation
Beginning with TEKLYNX CENTRAL v6, the LABELNET webservices application uses a REST API to send print jobs through SENTINEL. The error message is indicating that the IP address used in the REST API is invalid.
Solution
The solution to this issue is to make sure that the IP addresses in the LABELNET WebPrintAPI config file (appsettings.json) point to the correct IP address for the machine hosting SENTINEL. Most often, this is the same computer LABELNET is using. You will also need to make sure that the REST API settings in the SENTINEL watches are also pointing to the correct IP address, ports and server, such as the network adapter.
STEP 1 – Change the Server IP Address in LABELNET WebPrintAPI SENTINEL
- Navigate to the folder C:\Program Files (x86)\Teklynx\LABELNET WebPrintAPI.
- Edit the appsettings.json config file.
- Change the highlighted lines to the correct IP addresses of the machine.

- Save the file
- Restart the LABELNET Host Common and Label Print Manager Services.

STEP 2 – Update the SENTINEL REST API Settings
- Open SENTINEL Manager.
- Deactivate the REST API SENTINEL.

- Navigate to the Settings within the RestAPI watch within SENTINEL.
- In the Connections window, highlight a connection to edit.
- Click on Modify.
- Change the Adapter dropdown to the correct adapter.
- Select OK.

NOTE: The IP addresses used are those those for the server (VM) being used as well as the port for each SENTINEL. Make sure to update the Web Server port field as needed.

- Repeat for the other two RestAPI watches.
- Activate the REST API Watches.

Additional Comments
Issue Found in: TEKLYNX CENTRAL v6
If you need further assistance, please contact us.
Author
Related Articles
- Loftware Redirect Print to PDF action using multiple printer seats
- License is failed – TEKLYNX CENTRAL Error Message
- Loftware Web Designer vs Desktop Designer
- Loftware Workday API Splitting Print Jobs
- Planning a BarTender Server Migration and Upgrade – BarTender Instructions Article
- Deciding on an In-Place Upgrade, Test Server, or Migration – BarTender Reference Article