I'm getting an intermittent error when calling a .NET web service from a .NET
console application. Both are using v.1.1.4322 of the framework.
Any ideas on what could be causing this? It can fail and then a few seconds
later can work fine.
The exception is:
<log4net:event logger="WRDataSyncApp"
timestamp="2005-01-11T03:00:49.7336956-05:00" level="ERROR" thread="5808"
domain="WRDataSyncApp.exe"
username="CLT01IAWEB010N0\EquityAdmin"><log4net:me ssage>Exception:
System.InvalidOperationException
Message: There is an error in XML document (1, 290).
Source: System.Xml
at System.Xml.Serialization.XmlSerializer.Deserialize (XmlReader
xmlReader, String encodingStyle)
at System.Xml.Serialization.XmlSerializer.Deserialize (XmlReader xmlReader)
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at DataSynchronization.ConferenceScheduler.GetAllRegi strations(String
UserName, String Password)
at DataSynchronization.RegistrationSyncable.AddWRData ToDataSet(DataSet
ds, ConferenceScheduler webSrvc)
at DataSynchronization.WRDataSync.SynchronizeData()
at WRDataSyncApp.Main(String[] args)
Nested Exception
Exception: System.ArgumentOutOfRangeException
Message: Non-negative number required.
Parameter name: byteCount
Source: mscorlib
at System.Text.UTF8Encoding.GetChars(Byte[] bytes, Int32 byteIndex, Int32
byteCount, Char[] chars, Int32 charIndex, UTF8Decoder decoder)
at System.Text.UTF8Decoder.GetChars(Byte[] bytes, Int32 byteIndex, Int32
byteCount, Char[] chars, Int32 charIndex)
at System.IO.StreamReader.ReadBuffer(Char[] userBuffer, Int32 userOffset,
Int32 desiredChars, Boolean& readToUserBuffer)
at System.IO.StreamReader.Read(Char[] buffer, Int32 index, Int32 count)
at System.Xml.XmlScanner.Read()
at System.Xml.XmlScanner.ScanEscape()
at System.Xml.XmlScanner.ScanContent()
at System.Xml.XmlTextReader.ParseBeginTagExpandCharEn tities()
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlReader.ReadElementString()
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlS erializationReader1.Read15_GetAllRegistrationsResp onse()
</log4net:message><log4net:locationInfo class="WRDataSyncApp" method="Main"
file="" line="0" /></log4net:event>