truncated form POST

Discussion in 'ASP General' started by EricY, Apr 23, 2009.

  1. EricY

    EricY Guest

    We have an intermittent issue where it appears that the form is being
    truncated after exactly 1008 characters. This causes server-side code
    to fail as it is expecting certain fields to exist. To figure out
    what is happening we started logging the entire form to our log table
    when an error occurs. What we are seeing is that the form is being
    cut off after 1,008 characters.

    When I say it is cut off, I mean it looks like this example:

    A normal form:
    "txtInput1=123&txtInput2=456&txtInput3=789"

    Truncated form:
    "txtInput1=123&txtInput2=456&txtIn"

    The cutoff point varies in the form depending on the size of the field
    values, but the length of the value stored is always 1008 characters.
    We wrapped tags around the form so that we would be sure to capture
    the entire thing when we logged it. Forcing an error on a dev server
    so that a correct form would be logged shows that a normal form is
    around 1,500 characters or so.

    This is happening on a classic asp page but we also have .net 2.0 code
    running in the same app. Servers are running windows 2003.

    Has anyone ever experienced this?

    Thanks for any help...

    Eric
    EricY, Apr 23, 2009
    #1
    1. Advertising

  2. EricY

    Bob Barrows Guest

    EricY wrote:
    > We have an intermittent issue where it appears that the form is being
    > truncated after exactly 1008 characters. This causes server-side code
    > to fail as it is expecting certain fields to exist. To figure out
    > what is happening we started logging the entire form to our log table
    > when an error occurs. What we are seeing is that the form is being
    > cut off after 1,008 characters.
    >
    > When I say it is cut off, I mean it looks like this example:
    >
    > A normal form:
    > "txtInput1=123&txtInput2=456&txtInput3=789"
    >
    > Truncated form:
    > "txtInput1=123&txtInput2=456&txtIn"
    >


    Do you know what the untruncated submission was supposed to look like?
    Are you using GET? Those look like querystrings ...

    --
    HTH,
    Bob Barrows
    Bob Barrows, Apr 23, 2009
    #2
    1. Advertising

  3. EricY

    EricY Guest

    On Apr 23, 1:19 pm, "Bob Barrows" <> wrote:
    > EricY wrote:
    > > We have an intermittent issue where it appears that the form is being
    > > truncated after exactly 1008 characters.  This causes server-side code
    > > to fail as it is expecting certain fields to exist.  To figure out
    > > what is happening we started logging the entire form to our log table
    > > when an error occurs.  What we are seeing is that the form is being
    > > cut off after 1,008 characters.

    >
    > > When I say it is cut off, I mean it looks like this example:

    >
    > > A normal form:
    > > "txtInput1=123&txtInput2=456&txtInput3=789"

    >
    > > Truncated form:
    > > "txtInput1=123&txtInput2=456&txtIn"

    >
    > Do you know what the untruncated submission was supposed to look like?
    > Are you using GET? Those look like querystrings ...
    >
    > --
    > HTH,
    > Bob Barrows- Hide quoted text -
    >
    > - Show quoted text -


    Thanks Bob.

    Yes, I know what the full submission is supposed to look like, and
    it's definitely being truncated.

    The form method is POST, but in ASP you can simply do a:

    Response.write (Request.Form) and it will spit out the entire
    form...although what it spits out looks like a querystring.

    On "good" form submissions the length of Request.Form is over 1,500
    chars... on bad submissions it's exactly 1,008 chars.

    Eric
    EricY, Apr 23, 2009
    #3
  4. EricY

    Bob Barrows Guest

    EricY wrote:
    > On Apr 23, 1:19 pm, "Bob Barrows" <> wrote:
    >> EricY wrote:
    >>> We have an intermittent issue where it appears that the form is
    >>> being truncated after exactly 1008 characters. This causes
    >>> server-side code to fail as it is expecting certain fields to
    >>> exist. To figure out what is happening we started logging the
    >>> entire form to our log table when an error occurs. What we are
    >>> seeing is that the form is being cut off after 1,008 characters.

    >>
    >>> When I say it is cut off, I mean it looks like this example:

    >>
    >>> A normal form:
    >>> "txtInput1=123&txtInput2=456&txtInput3=789"

    >>
    >>> Truncated form:
    >>> "txtInput1=123&txtInput2=456&txtIn"

    >>
    >> Do you know what the untruncated submission was supposed to look
    >> like? Are you using GET? Those look like querystrings ...
    >>


    > Thanks Bob.
    >
    > Yes, I know what the full submission is supposed to look like, and
    > it's definitely being truncated.
    >

    I was trying to determine if there were any invalid characters in the
    form submission that would cause it to be truncated if GET was being
    used. But I now see you are using POST so it's no longer relevant.

    > The form method is POST, but in ASP you can simply do a:
    >
    > Response.write (Request.Form) and it will spit out the entire
    > form...although what it spits out looks like a querystring.
    >

    I prefer to do a loop like this:
    <%
    for each x in Request.Form
    Response.Write("<br>" & x & " = " & Request.Form(x))
    next
    %>

    If you're still missing data, then I'm at a loss ... wait, is every
    submission over 1008 characters truncated? Or only some of them?

    --
    HTH,
    Bob Barrows
    Bob Barrows, Apr 23, 2009
    #4
  5. EricY

    Bob Barrows Guest

    EricY wrote:
    > On Apr 23, 1:19 pm, "Bob Barrows" <> wrote:
    >> EricY wrote:
    >>> We have an intermittent issue where it appears that the form is
    >>> being truncated after exactly 1008 characters. This causes
    >>> server-side code to fail as it is expecting certain fields to
    >>> exist. To figure out what is happening we started logging the
    >>> entire form to our log table when an error occurs. What we are
    >>> seeing is that the form is being cut off after 1,008 characters.

    >>

    See if this is relevant:
    http://classicasp.aspfaq.com/forms/what-is-the-limit-on-form/post-parameters.html
    --
    HTH,
    Bob Barrows
    Bob Barrows, Apr 23, 2009
    #5
  6. EricY

    EricY Guest

    On Apr 23, 4:50 pm, "Bob Barrows" <> wrote:
    > EricY wrote:
    > > On Apr 23, 1:19 pm, "Bob Barrows" <> wrote:
    > >> EricY wrote:
    > >>> We have an intermittent issue where it appears that the form is
    > >>> being truncated after exactly 1008 characters. This causes
    > >>> server-side code to fail as it is expecting certain fields to
    > >>> exist. To figure out what is happening we started logging the
    > >>> entire form to our log table when an error occurs. What we are
    > >>> seeing is that the form is being cut off after 1,008 characters.

    >
    > >>> When I say it is cut off, I mean it looks like this example:

    >
    > >>> A normal form:
    > >>> "txtInput1=123&txtInput2=456&txtInput3=789"

    >
    > >>> Truncated form:
    > >>> "txtInput1=123&txtInput2=456&txtIn"

    >
    > >> Do you know what the untruncated submission was supposed to look
    > >> like? Are you using GET? Those look like querystrings ...

    >
    > > Thanks Bob.

    >
    > > Yes, I know what the full submission is supposed to look like, and
    > > it's definitely being truncated.

    >
    > I was trying to determine if there were any invalid characters in the
    > form submission that would cause it to be truncated if GET was being
    > used. But I now see you are using POST so it's no longer relevant.
    >
    > > The form method is POST, but in ASP you can simply do a:

    >
    > > Response.write (Request.Form) and it will spit out the entire
    > > form...although what it spits out looks like a querystring.

    >
    > I prefer to do a loop like this:
    > <%
    >     for each x in Request.Form
    >         Response.Write("<br>" & x & " = " & Request.Form(x))
    >     next
    > %>
    >
    > If you're still missing data, then I'm at a loss ... wait, is every
    > submission over 1008 characters truncated? Or only some of them?
    >
    > --
    > HTH,
    > Bob Barrows- Hide quoted text -
    >
    > - Show quoted text -


    Thanks for your help Bob. The issue only happens once or twice per
    day on this particular page (out of possibly 1,000+ submissions/day).
    This form submission is *always* greater than 1008 characters - even
    if the form elements have no values in them the form size is
    approximately 1,100 chars with just the form element names. 99.9% of
    the time the form submits fine with no issues. In fact, I can not
    reproduce the error myself but it's obviously happening as reported by
    our logs. But the 0.1% of the time it happens the form seems to be
    cut off at 1008 characters. Perhaps we should change the logging to
    do the loop you mentioned, possibly to rule out or even identify
    something else that might be going on. Note that we've never seen
    this in any of our dev or QA environments; only in our production
    environment.

    However, I'm fairly confident that the elements are being truncated as
    expected and here is why. Three of the form elements make up a date
    field; txtMonth, txtDay, txtYear. We first noticed the error b/c
    sometimes we were getting an invalid date error when we combined those
    fields to make a date value. I started logging the values of those
    fields and was always getting empty strings...eventually we expanded
    the logging to include the entire form and the date fields aren't even
    there (they appear at the end of the form so they get truncated when
    the issue occurs).

    I don't know if this is related, but occasionally we get "invalid
    postback or callback argument" errors in the .net code which from what
    I can tell could be caused by truncated form. Maybe coincidence,
    maybe something related?

    Sorry to be so long-winded... thanks again!

    Eric
    EricY, Apr 24, 2009
    #6
  7. EricY

    EricY Guest

    On Apr 23, 4:54 pm, "Bob Barrows" <> wrote:
    > EricY wrote:
    > > On Apr 23, 1:19 pm, "Bob Barrows" <> wrote:
    > >> EricY wrote:
    > >>> We have an intermittent issue where it appears that the form is
    > >>> being truncated after exactly 1008 characters. This causes
    > >>> server-side code to fail as it is expecting certain fields to
    > >>> exist. To figure out what is happening we started logging the
    > >>> entire form to our log table when an error occurs. What we are
    > >>> seeing is that the form is being cut off after 1,008 characters.

    >
    > See if this is relevant:http://classicasp.aspfaq.com/forms/what-is-the-limit-on-form/post-par...
    > --
    > HTH,
    > Bob Barrows


    Thanks for that info. Unfortunately this isn't our issue. We have a
    pretty high limit on our form size to allow for file uploads. I think
    we have it set to something like 50MB (not exact, but it's in that
    ballpark).

    Eric
    EricY, Apr 24, 2009
    #7
  8. EricY wrote on Fri, 24 Apr 2009 06:45:16 -0700 (PDT):

    > On Apr 23, 4:50 pm, "Bob Barrows" <> wrote:
    >> EricY wrote:
    >>> On Apr 23, 1:19 pm, "Bob Barrows" <> wrote:
    >>>> EricY wrote:
    >>>>> We have an intermittent issue where it appears that the form is
    >>>>> being truncated after exactly 1008 characters. This causes
    >>>>> server-side code to fail as it is expecting certain fields to
    >>>>> exist. To figure out what is happening we started logging the
    >>>>> entire form to our log table when an error occurs. What we are
    >>>>> seeing is that the form is being cut off after 1,008 characters.


    >>>>> When I say it is cut off, I mean it looks like this example:


    >>>>> A normal form:
    >>>>> "txtInput1=123&txtInput2=456&txtInput3=789"


    >>>>> Truncated form:
    >>>>> "txtInput1=123&txtInput2=456&txtIn"


    >>>> Do you know what the untruncated submission was supposed to look
    >>>> like? Are you using GET? Those look like querystrings ...


    >>> Thanks Bob.


    >>> Yes, I know what the full submission is supposed to look like, and
    >>> it's definitely being truncated.


    >> I was trying to determine if there were any invalid characters in the
    >> form submission that would cause it to be truncated if GET was being
    >> used. But I now see you are using POST so it's no longer relevant.


    >>> The form method is POST, but in ASP you can simply do a:


    >>> Response.write (Request.Form) and it will spit out the entire
    >>> form...although what it spits out looks like a querystring.


    >> I prefer to do a loop like this:
    >> <%
    >> for each x in Request.Form Response.Write("<br>" & x & "
    >> = " & Request.Form(x))
    >> next %>


    >> If you're still missing data, then I'm at a loss ... wait, is every
    >> submission over 1008 characters truncated? Or only some of them?


    >> --
    >> HTH,
    >> Bob Barrows- Hide quoted text -


    >> - Show quoted text -


    > Thanks for your help Bob. The issue only happens once or twice per day
    > on this particular page (out of possibly 1,000+ submissions/day).
    > This form submission is *always* greater than 1008 characters - even if
    > the form elements have no values in them the form size is approximately
    > 1,100 chars with just the form element names. 99.9% of the time the
    > form submits fine with no issues. In fact, I can not reproduce the
    > error myself but it's obviously happening as reported by our logs. But
    > the 0.1% of the time it happens the form seems to be cut off at 1008
    > characters. Perhaps we should change the logging to do the loop you
    > mentioned, possibly to rule out or even identify something else that
    > might be going on. Note that we've never seen this in any of our dev
    > or QA environments; only in our production environment.


    > However, I'm fairly confident that the elements are being truncated as
    > expected and here is why. Three of the form elements make up a date
    > field; txtMonth, txtDay, txtYear. We first noticed the error b/c
    > sometimes we were getting an invalid date error when we combined those
    > fields to make a date value. I started logging the values of those
    > fields and was always getting empty strings...eventually we expanded
    > the logging to include the entire form and the date fields aren't even
    > there (they appear at the end of the form so they get truncated when
    > the issue occurs).


    > I don't know if this is related, but occasionally we get "invalid
    > postback or callback argument" errors in the .net code which from what
    > I can tell could be caused by truncated form. Maybe coincidence, maybe
    > something related?


    > Sorry to be so long-winded... thanks again!


    > Eric



    Are these posts from known client machines? Or are they from all over the
    place? Can you log the request headers too? Maybe there's a commonality to
    all these requests, such as requests coming through a proxy server that
    restricts POST data to 1008 characters.

    --
    Dan
    Daniel Crichton, Apr 24, 2009
    #8
  9. EricY

    EricY Guest

    On Apr 24, 10:04 am, "Daniel Crichton" <>
    wrote:
    > EricY wrote  on Fri, 24 Apr 2009 06:45:16 -0700 (PDT):
    >
    > > On Apr 23, 4:50 pm, "Bob Barrows" <> wrote:

    >  >> EricY wrote:
    >
    >  >>> On Apr 23, 1:19 pm, "Bob Barrows" <> wrote: >>>> EricY wrote:
    >
    >  >>>>> We have an intermittent issue where it appears that the form is
    >  >>>>> being truncated after exactly 1008 characters. This causes
    >  >>>>> server-side code to fail as it is expecting certain fields to
    >  >>>>> exist. To figure out what is happening we started logging the
    >  >>>>> entire form to our log table when an error occurs. What we are
    >  >>>>> seeing is that the form is being cut off after 1,008 characters.
    >
    >  >>>>> When I say it is cut off, I mean it looks like this example:
    >
    >  >>>>> A normal form:
    >  >>>>> "txtInput1=123&txtInput2=456&txtInput3=789"
    >
    >  >>>>> Truncated form:
    >  >>>>> "txtInput1=123&txtInput2=456&txtIn"
    >
    >  >>>> Do you know what the untruncated submission was supposed to look
    >  >>>> like? Are you using GET? Those look like querystrings ...
    >
    >  >>> Thanks Bob.
    >
    >  >>> Yes, I know what the full submission is supposed to look like, and
    >  >>> it's definitely being truncated.
    >
    >  >> I was trying to determine if there were any invalid characters in the
    >  >> form submission that would cause it to be truncated if GET was being
    >  >> used. But I now see you are using POST so it's no longer relevant.
    >
    >  >>> The form method is POST, but in ASP you can simply do a:
    >
    >  >>> Response.write (Request.Form) and it will spit out the entire
    >  >>> form...although what it spits out looks like a querystring.
    >
    >  >> I prefer to do a loop like this:
    >  >> <%
    >  >>     for each x in Request.Form         Response.Write("<br>" & x & "
    >  >> = " & Request.Form(x))
    >  >>     next %>
    >
    >  >> If you're still missing data, then I'm at a loss ... wait, is every
    >  >> submission over 1008 characters truncated? Or only some of them?
    >
    >  >> --
    >  >> HTH,
    >  >> Bob Barrows- Hide quoted text -
    >
    >  >> - Show quoted text -
    >
    >
    >
    >
    >
    > > Thanks for your help Bob.  The issue only happens once or twice per day
    > > on this particular page (out of possibly 1,000+ submissions/day).
    > > This form submission is *always* greater than 1008 characters - even if
    > > the form elements have no values in them the form size is approximately
    > > 1,100 chars with just the form element names.  99.9% of the time the
    > > form submits fine with no issues.  In fact, I can not reproduce the
    > > error myself but it's obviously happening as reported by our logs.  But
    > > the 0.1% of the time it happens the form seems to be cut off at 1008
    > > characters.  Perhaps we should change the logging to do the loop you
    > > mentioned, possibly to rule out or even identify something else that
    > > might be going on.  Note that we've never seen this in any of our dev
    > > or QA environments; only in our production environment.
    > > However, I'm fairly confident that the elements are being truncated as
    > > expected and here is why.  Three of the form elements make up a date
    > > field; txtMonth, txtDay, txtYear.  We first noticed the error b/c
    > > sometimes we were getting an invalid date error when we combined those
    > > fields to make a date value.  I started logging the values of those
    > > fields and was always getting empty strings...eventually we expanded
    > > the logging to include the entire form and the date fields aren't even
    > > there (they appear at the end of the form so they get truncated when
    > > the issue occurs).
    > > I don't know if this is related, but occasionally we get "invalid
    > > postback or callback argument" errors in the .net code which from what
    > > I can tell could be caused by truncated form.  Maybe coincidence, maybe
    > > something related?
    > > Sorry to be so long-winded... thanks again!
    > > Eric

    >
    > Are these posts from known client machines? Or are they from all over the
    > place? Can you log the request headers too? Maybe there's a commonality to
    > all these requests, such as requests coming through a proxy server that
    > restricts POST data to 1008 characters.
    >
    > --
    > Dan- Hide quoted text -
    >
    > - Show quoted text -


    Dan,

    These posts are from all over the place. Our site is a subscription-
    based app with subscribers all over the country. I haven't noticed
    any commonality across clients, but I haven't really focused on that.

    I'll see if I can start logging the request headers. Will likely have
    to wait for our next code release though - probably in a few weeks or
    so.

    Thanks for the suggestion.

    Eric
    EricY, Apr 24, 2009
    #9
  10. Gazing into my crystal ball I observed EricY <> writing
    in news::

    >
    > These posts are from all over the place. Our site is a subscription-
    > based app with subscribers all over the country. I haven't noticed
    > any commonality across clients, but I haven't really focused on that.
    >


    Perhaps it's a browser problem. Have a look at UA strings to see if there
    is a commonality there.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne Boswell, Apr 24, 2009
    #10
    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. Guest

    truncated form post

    Guest, Jan 7, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    482
    Kevin Spencer
    Jan 7, 2004
  2. truncated form post

    , Jan 16, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    409
  3. Ian Lotinsky

    POST data truncated in Internet Explorer 6

    Ian Lotinsky, Apr 30, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    678
    Ian Lotinsky
    May 2, 2006
  4. EricY

    truncated form POST

    EricY, Aug 6, 2009, in forum: ASP General
    Replies:
    0
    Views:
    768
    EricY
    Aug 6, 2009
  5. Replies:
    7
    Views:
    259
    A. Sinan Unur
    Feb 14, 2006
Loading...

Share This Page