Non-negative number required. Parameter name: byteCount

Discussion in 'ASP .Net Web Services' started by James, Jan 7, 2007.

  1. James

    James Guest

    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
    James, Jan 7, 2007
    #1
    1. Advertising

  2. 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.
    Steven Cheng[MSFT], Jan 8, 2007
    #2
    1. Advertising

  3. 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.
    Steven Cheng[MSFT], Jan 9, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. prem_eda
    Replies:
    5
    Views:
    7,813
    Pieter Hulshoff
    Oct 11, 2004
  2. Replies:
    3
    Views:
    29,985
    Abid Ali
    Feb 22, 2011
  3. EK
    Replies:
    0
    Views:
    307
  4. MRAB
    Replies:
    2
    Views:
    292
    John Machin
    Jan 31, 2009
  5. Stefan
    Replies:
    2
    Views:
    455
    Stefan
    Jul 31, 2004
Loading...

Share This Page