Well, there are lots of reasons why I'm not using ASP.NET. The reason today, though, is that it seems to be impossible to post to an ASP.NET website using a non-browser tool such as wget or Python's urllib. There's a huge __VIEWSTATE form variable, and links seem to call a JavaScript function called __doPostBack(). Of course, it requires JavaScript to work. This is shit. Yes it is.
Fortunately, __doPostBack() doesn't do anything very complicated in the page I want to manipulate. Sadly, though, I've tried POSTing what I think the output of the form will be to the URL, and I get no love from it at all. Lots of <H1>Bad Request</h1> and the like. Has anyone dealt with this problem?
I've not ever had a great need to test replicating what doPostBack is doing, which is just creating two new form variables on the fly. Mostly because I have always contrived to avoid using doPostBack by using standard submit buttons.
However, I did a quick test by capturing the headers for a login form and pasting them into telnet, and got back pretty much what I would have if I was posting from the browswer.
They only thing I can imagine needing to note is that you do need to url encode the __VIEWSTATE, __EVENTHANDLER, and __EVENTARGUMENT variables.