intermittent error calling .NET web service


E

Eddie J

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:message>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.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at DataSynchronization.ConferenceScheduler.GetAllRegistrations(String
UserName, String Password)
at DataSynchronization.RegistrationSyncable.AddWRDataToDataSet(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.ParseBeginTagExpandCharEntities()
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlReader.ReadElementString()
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read15_GetAllRegistrationsResponse()

</log4net:message><log4net:locationInfo class="WRDataSyncApp" method="Main"
file="" line="0" /></log4net:event>
 
Ad

Advertisements

K

Kevin Yu [MSFT]

Hi

We have reviewed this issue and are currently researching on it. We will
update you ASAP. Thanks for your patience!

Luke Zhang
==========
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
M

[MSFT]

Hello,

From the error message, it seems the web method cannot accept the Argument
byteCount. Since the problem occurred randomly, is the value of byteCount
changed randomly? If we set same value for "byteCount", can the problem be
reproduce?

Luke
 
E

Eddie J

I believe we have found a solution to the problem. The web service has
security features that prevent only certain IPs to call the web service. The
web service was also external to the the corporate network I work within.
When the call left the network, the IP address changed and would not be in
the range of acceptable IPs, but sometimes it would.

Thanks for your help on this issue. I appreciate your prompt responses.
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top