Hello --
I have developed a web service that connects to SQL Server, retrieves
data, and returns an XML String from a StringWriter through
DataSet.WriteXML(). That XML String is read into a StringWriter and
turned into a DataSet through ReadXML() to be used on the client side.
My problem is pretty strange. Occasionally, the data that comes back to
the client is incomplete. I have experienced missing columns and one
occasion of a missing row. Since the error is client-side, that says to
me that the data is successfully retrieved, successfully turned into XML,
successfully transmitted across the internet, and successfully read into
the client-side DataSet. It is not until the DataSet is accessed that
there is a problem. Most commonly, the error that occurs is that a column
name does not exist inside the DataView, although sometimes the error is
that the table does not exist inside the DataSet.
Interestingly, this only appears to occur when a web application accesses
the web service. If a Windows Forms application accesses the web service,
there does not seem to be a problem. It seems like I can reduce the
problem by running the web service and web application in High (Isolated)
mode and shutting off the Session variable on the web service. Sometimes
even that breaks, and I have to restart IIS...
I am making a guess that this has to do with some kind of threading
issue. No errors occur when the web service is accessed in a thread-bound
window, and the errors appear to get better when the web service and web
application are run out-of-proc.
We're stumped by this one. Has anybody ever experienced anything like
this??
Thanks,
Robert Herrick