Non-negative number required. Parameter name: byteCount

J

James

How can this issue be resolved (in the subject). bytecount is not a
parameter in my functions. I read from some other groups that this is
related to the IP change whil the transactions take place. Any solution for
this?

Thanks
James
 
S

Steven Cheng[MSFT]

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.
 
S

Steven Cheng[MSFT]

Thanks for your reply James,

Yes, currently, for this issue we may need to manually inspect the
server-side error and try avoiding it. BTW, since this is a known issue
recorded, if you want a thorough solution such as a hotfix for your
particular scenario, you can directly contact CSS for further assistance on
this:

http://msdn.microsoft.com/subscriptions/support/default.aspx

In addition, you're welcome to submit any request or feedback to our
product feedback center so that the dev team can hear more on this:

http://connect.microsoft.com/feedback/default.aspx?SiteID=210

Again, thanks for your posting.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 

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

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top