Michael Maddison
michael at ddisolutions.com.au
Mon Nov 23 23:38:16 CST 2009
Hi guys, I may be clutching at straws here but has anyone done much with HttpWebRequest? My process goes like this, GET /ExpressBet/Standard/Default.aspx?State=2 Store the cookie container for re use GET /ExpressBet/LoginFrame.aspx?State=2&ExpressBetMode=Standard Store viewState for re use in next POST POST /Login/LoginUser.aspx?State=2&ReturnURL=http://www.tab.com.au/ExpressBet/LoginFrame.aspx?State=2&ExpressBetMode=Standard Does login, this succeeds GET /ExpressBet/Aggregator.aspx?State=2&Controls=STD_MAIN&RacingCode=R&MeetingCode=M&FromDate=2009-11-24T00:00:00&RaceNumber=07&BetType=WinPlace&ExpressBetMode=Standard Store viewState for re use GET /Betting/BetTicket/DisplayClientSideBetTicket.aspx?State=2&ExpressBet=true&RacingCode=R&MeetingCode=M&FromDate=2009-11-24T00:00:00&BetType=WinPlace&amount=1.00&Selections=%3csc+id%3d%220%22+f%3d%22false%22+m%3d%220%22+s%3d%228%22+t%3d%22%22+k%3d%2207%22+%2f%3e+ The above redirects to GET /Betting/BetTicket/PlaceRaceBetConfirmation.aspx?State=2&CurrentBet=2901d195-c59a-4c1b-8b0a-c476fc274f06&ExpressBet=True Result looks ok in Fiddler, But response is unreadable in plain text. Anyone know what this is? I think I need to get the viewstate from it somehow. Snipped because of size constraints. _?‡¨2°?-w?sF?ð'15??1??_i???i??_l?___???_?__?S??fY?d?R_adZ?Ri??__ 2?#??4+?='+?<?)97?8??-;_l????sJ~?GP??EY?q??O^PFd?iV??AidDh_(?_?M?|Àr?r?À< ##??S],CR??ÀBÀ?*s?_?=0?"???- ?=S??3r"Ãr?s?rR= ??r?R???##?r<??J#?,??r?sò==???r??*???S?r??"?*??=??L?S?3r<=?2??B??0????+__??%i??9`?.I?a?)??N`9??pgGO__?__?_?__7_??>?N!??_n^???????nQ^?`????_?_____?0???_?h??X????_???dvTH??`??[?k?Sh?SDp??[h?c?OH???k?K?{??3??@°'13OW7???À0W°?<?t?*?l??txZq4 at AP?cz>8,?À??r2????_=}A???{?@??? i???)?5__F_?[?S?'4N?__C]}?M?}?Af???s?H??KÇ-H?€ ?u+N ðs?r,? The Last step I need to do is a final POST, This returns an error page, dammit. POST /Betting/BetTicket/PlaceRaceBetConfirmation.aspx?State=2&CurrentBet=2901d195-c59a-4c1b-8b0a-c476fc274f06&ExpressBet=True Redirects to an error.aspx page. The code for the last POST is the same for the successful calls as the failed call. Both are HTTPS, I am handling the certificates. Does this make sense to anyone? J Any ideas? Cheers Michael M