Hello James,
From your description, you're getting the following error when calling a
certain ASP.NET webservice.
<Non-negative number required. Parameter name: byteCount>
As for the this problem, I'd like to confrom the following things:
1. Are you getting this error at client-side (webservice proxy)
2. Is your ASP.NET server service built on ASP.NET 1.1 or 2.0?
Based on my research, the error message you were getting "Non-negative
number required. Parameter name: byteCount" is basically a known issue in
our error handling code in .NET 1.1 framework. Here is the detailed
description on this:
The server is returning a response to the client. This response was an HTTP
200
response, so the .NET framework will process this expecting a normal soap
envelope.
The problem however is that the content (or error message) returned from
the server
had a content type of '' instead of 'text/xml', which is what we expect for
the
soap 1.1 protocol, or if you were using soap 1.2 protocol we would have
excepted
the content type of 'application/soap+xml'.
At the point when we see this incorrect content type we try to raise an
InvalidOperationException with the message text of client found response
content
type of '{0}', but expected '{1}' where we'd replace the place holders with
the
values we found and expected respectively. We call some internal methods
that tries
to read the response stream but we have a bug which passes a negative
number into
the number of characters we are to read so we get the failure within
GetChars().
<<<<<<<<<<<<<<<<<<<
Curerntly what I've found is a workaround here:
Resolution
==================
- Get a network trace of the failing response
- Analyze the response to find out if the server is simply sending an HTTP
200
packet with an error web page or message.
- Take actions on the error message that the server is sending, not on what
the
client is getting while trying to parse the servers error message.
==================
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.