locked
Error: System.InvalidOperationException: There is an error in XML document RRS feed

  • Question

  • I am receiving this error when trying to transfer an XML document to a remote sql server. Data is stored in a SQL database on a VM machine running Windows Server 2008 R2 and is being transferred to another server via a web service. Multiple tables are being transferred and the error is produced when one particular table is transferred. Furthermore, the issue is not consistent in that sometimes the error is produced and sometimes the table is transported correctly.  The first few tables are imported fine into SQL but when it gets to one particular table the data is not imported and the error is produced.

     

    Actual Error:

    Error: System.InvalidOperationException: There is an error in XML document (1, 1900278). ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection

     

    Can anyone tell me where this issue occurs and how to correct the error?

     


    GK
    • Edited by GK8778 Wednesday, October 12, 2011 4:15 PM
    Wednesday, October 12, 2011 1:33 PM

Answers

  • Hello everyone,

     

    The data transfer is now successfully and working every time now. I am still unclear about what was causing the issue. Changes that were made were adjusting a content filter on the network for the ip address that was requesting the the service and disabling HTTP Keep-Alive settings in IIS 7.5.  Neither one of these worked independently but when combined the process does not fail. The log files in %systemdrive%\inetpub\Logs\LogFiles\ were very helpful in identifying where the issue was occurring.

     

    Cheers,

     

    GK


    GK
    Thursday, October 20, 2011 4:31 PM

All replies

  • Hi Gk,

    Could you please check that there is enough free space for the database files? Is there any error message in the Windows Event Log or SQL Server Logs? If yes, please try to release some space to see whether the error is removed or not.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Friday, October 14, 2011 5:34 AM
  • Hi Stephanie,

     

    Windows Event logs did not produce a lead as to where the source of the issue is being caused. The drive is only 42% full with plenty of space. Analysis of the sql log and activity monitor seems to suggest the process is running up to a certain point and then it appears that the web service drops the connection before the sql session finishes. I'm thinking there is something in IIS 7.5 that I am missing, a time-out setting perhaps is causing the issue. I have also tested the remote sql connection time-out setting and this does not seem to be root of the issue.

     

    Gk


    GK
    • Edited by GK8778 Friday, October 14, 2011 1:53 PM
    Friday, October 14, 2011 1:30 PM
  • Did you use an application to call the web service to transfer the data? The error may occur if the network connection is not stable or if your server encountered a performance problem. You may try adding a connection retry logic into your code. For example, once you receive this error message, you can retry the connection for additional two times at most.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Monday, October 17, 2011 8:18 AM
  • Yes, I am using an application to call the web service. The application makes a call to the web service for each process (table import) it runs on the remote server.  I'm not sure if there is a retry or not in the code, I will have to check. It does seem to be some sort of timeout issue but I have tested all the timeout values in SQL and IIS I can think of and have researched. Any thoughts on this?

     

    A retry would only mask the issue and not give me a solution as to what is actually causing the issue.

    In looking at the IIS log files I can see an sc-win32-status code of 995 but it doesn't really explain where the problem is occurring, i think.

     

     

    Thank you for your response.


    GK

    • Edited by GK8778 Monday, October 17, 2011 7:00 PM
    Monday, October 17, 2011 2:59 PM
  • Hello everyone,

     

    The data transfer is now successfully and working every time now. I am still unclear about what was causing the issue. Changes that were made were adjusting a content filter on the network for the ip address that was requesting the the service and disabling HTTP Keep-Alive settings in IIS 7.5.  Neither one of these worked independently but when combined the process does not fail. The log files in %systemdrive%\inetpub\Logs\LogFiles\ were very helpful in identifying where the issue was occurring.

     

    Cheers,

     

    GK


    GK
    Thursday, October 20, 2011 4:31 PM