riteSOFT Support

Error - "The underlying connection was closed: An unexpected error occurred on a receive"

Generally this error is resolved by one of the following procedures:

  1. Restarting the UltiDev Web Service. Please review the following article for more information: Restart UltiDev Web Service
  2. Re-registering the SYSPRO encore.dll file. Please review the following article for more information: Re-register SYSPRO encore.dll

If the above procedures do not resolve the issue, please review the following:

This error is due to the (TCP) connection to the server being closed before the riteSCAN client could receive a response. The error message tells us a couple things, the riteSCAN client successfully connected to the server (we know this because we aren't seeing an error message saying it couldn't connect or couldn't resolve the remote name) and the riteSCAN client thinks it successfully sent the request (i.e. we don't see an error saying "The underlying connection was closed: An unexpected error occurred on a send"). So this means that the riteSCAN client is telling us the connection was closed unexpectedly somewhere after the request was sent to the server and before the server's response was received back by the riteSCAN client. One thing to note is that the server isn't necessarily closing the connection, it could be intermittent connectivity to the server.

Possible causes of this error include:

  • Intermittent wi-fi connectivity
    • If you also experience the same issue on devices that are not using the wi-fi connection, such as Windows PC's, the wi-fi connectivity is likely not the cause.
  • An execution timeout on the server (i.e. the request took too long to process)
  • SYSPRO business objects taking too long to process
  • SQL triggers or long running reports causing requests to take longer to process
  • Firewall/antivirus blocking requests
  • riteSCAN crashing

The possible causes listed above are all issues that need to be resolved by the customer's internal IT staff, with the exception of 'riteSCAN crashing', which riteSCAN Support can help with.

In order for riteSCAN Support to better assist in troubleshooting this error, please provide the following. All of these should be done while the error is occurring:
  1. Enable 'logging' in riteSCAN as outlined here: Turn on debugging mode to generate a log file Please provide support with this log file.
  2. Enable 'tracing' on the Web Service, as outlined here: Enable tracing within riteSCAN Administration Please provide support with this log file.
  3. Test the connection from the riteSCAN Server by going to the riteSCAN Landing Page (http://localhost:8300/ritescan.asmx). Click "Check Connection". Enter any text in the box (the text you enter in the box is not important) and click Invoke. You should receive a response from the Web Service. This helps test to see if the riteSCAN Web Service can process requests that are not related to SYSPRO or SQL. Please provide Support with a screenshot of the response received after clicking Invoke.
    • Below is a sample response. Click the image for a larger view:
  4. Please attempt to login using the e.NET Diagnostics Utility on the SYSPRO Server. In some cases, SYSPRO crashes the web service before returning a response to riteSCAN, loggin in through the Diagnostic Utility may reveal an underlying error that is not passed back to riteSCAN. Refer to this article for the login procedure: Using the e.NET Diagnostic Utility Please provide Support with any errors produced during login.
  5. From the riteSCAN Server, launch the UltiDev Web App Explorer from the Start menu. Click on the entry for "riteSCAN Web Service (Private)" and "riteSCAN Administration (Private)". Please provide Support with a screenshot of both entries.
    • Below are example screens. Click the images below for a larger view:

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.