Hello. I'm writing an application that screen-scapes an ASP.NET
application. This ASP.NET application uses a postback to refresh state
when the value of a field in a form is changed. This works fine in a
browser, but not in my proxy. The ASP.NET returns a 500 error without
any further explanation.

I'm wondering whether .NET requires a certain ordering of the POST
body parameters? The proxy does reorder some parameters.

Re: ASP.NET - Is HTTP Parameter ordering important? by Ed

Ed
Fri Feb 06 19:06:57 CST 2004

I don't believe so. Parameters are put in a dictionary and the lookups are
based on name, not index.

"Joe Morse" <joe_w_morse@yahoo.com> wrote in message
news:501756ee.0402061210.70563705@posting.google.com...
> Hello. I'm writing an application that screen-scapes an ASP.NET
> application. This ASP.NET application uses a postback to refresh state
> when the value of a field in a form is changed. This works fine in a
> browser, but not in my proxy. The ASP.NET returns a 500 error without
> any further explanation.
>
> I'm wondering whether .NET requires a certain ordering of the POST
> body parameters? The proxy does reorder some parameters.



Re: ASP.NET - Is HTTP Parameter ordering important? by joe_w_morse

joe_w_morse
Mon Feb 09 15:32:50 CST 2004

I suspected as much, as HTTP is fairly agnostic as to the order of the
parameters, and applications and frameworks typically just perform
lookups on a hash of some sort. I wonder if my problem has to do with
the ordering of HTTP headers.

"Ed Kaim [MSFT]" <edkaim@online.microsoft.com> wrote in message news:<eQ6JwaR7DHA.2404@TK2MSFTNGP12.phx.gbl>...
> I don't believe so. Parameters are put in a dictionary and the lookups are
> based on name, not index.
>
> "Joe Morse" <joe_w_morse@yahoo.com> wrote in message
> news:501756ee.0402061210.70563705@posting.google.com...
> > Hello. I'm writing an application that screen-scapes an ASP.NET
> > application. This ASP.NET application uses a postback to refresh state
> > when the value of a field in a form is changed. This works fine in a
> > browser, but not in my proxy. The ASP.NET returns a 500 error without
> > any further explanation.
> >
> > I'm wondering whether .NET requires a certain ordering of the POST
> > body parameters? The proxy does reorder some parameters.

Re: ASP.NET - Is HTTP Parameter ordering important? by joe_w_morse

joe_w_morse
Wed Feb 11 11:21:22 CST 2004

Many thanks for your help, Ed.

I figured out what the problem is. ASP.NET postbacks (and I think web
forms in general) pass a parameter called __VIEWSTATE to themselves.
This value (at least on my installation) contains characters that need
to be encoded (spaces, forward-slashes). My proxy was encoding them,
but used '+' to encode spaces instead of '%2B'. Once I manually
replaced the '+' characters, the postback worked.

I'm curious about the format of __VIEWSTATE values. Are the spaces and
other encodable characters absolutely needed, or is there some way to
configure IIS/.NET to use a value that doesn't need to be encoded?

Thanks,

Joe

joe_w_morse@yahoo.com (Joe Morse) wrote in message news:<501756ee.0402091332.26b2d96@posting.google.com>...
> I suspected as much, as HTTP is fairly agnostic as to the order of the
> parameters, and applications and frameworks typically just perform
> lookups on a hash of some sort. I wonder if my problem has to do with
> the ordering of HTTP headers.
>
> "Ed Kaim [MSFT]" <edkaim@online.microsoft.com> wrote in message news:<eQ6JwaR7DHA.2404@TK2MSFTNGP12.phx.gbl>...
> > I don't believe so. Parameters are put in a dictionary and the lookups are
> > based on name, not index.
> >
> > "Joe Morse" <joe_w_morse@yahoo.com> wrote in message
> > news:501756ee.0402061210.70563705@posting.google.com...
> > > Hello. I'm writing an application that screen-scapes an ASP.NET
> > > application. This ASP.NET application uses a postback to refresh state
> > > when the value of a field in a form is changed. This works fine in a
> > > browser, but not in my proxy. The ASP.NET returns a 500 error without
> > > any further explanation.
> > >
> > > I'm wondering whether .NET requires a certain ordering of the POST
> > > body parameters? The proxy does reorder some parameters.