Making posts to an ASP.NET webform.

Bernard bernard.chhun at
Wed Oct 4 17:33:12 CEST 2006

Gabriel Genellina wrote:
> At Monday 2/10/2006 13:05, Bernard wrote:
> > > > Has anyone tried what I'm doing? and if you tried how have you
> > > > succeeded getting the data back after the post action?
> Use a packet sniffer or something to look at an actual POST that
> works, this way you could see what's missing in your code.
> Gabriel Genellina
> Softlab SRL

Thanks for that suggestion Gabriel. It's really a great idea to see
what's going on behind the scene but it still doesn't work even though
the post made by my function has the same data as a real browser post.

here's the HTTP Header from my sniffer:

POST /Search/Default.aspx?Area=WC HTTP/1.1
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:
Gecko/20060728 Firefox/
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 4649
HTTP/1.x 200 OK
Cache-Control: private
Content-Length: 37519
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Date: Wed, 04 Oct 2006 15:15:37 GMT

and here's the output of the encoded data as well as the cookies in my

<Cookie ASP.NET_SessionId=lddb3iruopvpnjiar0dlytvi for>

encoded post data:

My function has already worked on other websites and I'm pretty
sure this would work out just fine. is there something I'm missing here?

More information about the Python-list mailing list