Results 1 to 4 of 4

Thread: ASP .NET - POST request method

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Posts
    29
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default ASP .NET - POST request method

    Hi everybody,
    I need help with creating correct POST request to website working with ASP .NET.
    May begin that my request was contructed by using sniffer results.
    Here it is:
    Qt Code:
    1. request.setRawHeader("Origin:","http://www.md5decrypter.co.uk");
    2. request.setRawHeader("X-Requested-With:","XMLHttpRequest");
    3. request.setRawHeader("Cache-Control:","no-cache");
    4. request.setRawHeader("X-MicrosoftAjax:","Delta=true");
    5. request.setRawHeader("Accept:","*/*");
    6. request.setRawHeader("Referer:","http://www.md5decrypter.co.uk/sha1-decrypt.aspx");
    7. request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded; charset=UTF-8");
    8. request.setRawHeader("Accept-Language:","pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4");
    9. request.setRawHeader("Accept-Charset:","ISO-8859-2,utf-8;q=0.7,*;q=0.3");
    10.  
    11. postData.addQueryItem("ctl00$ScriptManager1", "ctl00$MainContent$btnDecrypt");
    12. postData.addQueryItem("ctl00$MainContent$txtHashes", "f41b59b297ded4f90ba61ee3c5ff18220ae55c66");
    13. postData.addQueryItem("ctl00$MainContent$txtCaptcha", sCaptcha);
    14. //postData.addQueryItem("__EVENTTARGET", "ctl00$MainContent$btnDecrypt");
    15. //postData.addQueryItem("__VIEWSTATE", sViewState);
    16. postData.addQueryItem("__EVENTVALIDATION", sEventValidation);
    17. postData.addQueryItem("__ASYNCPOST", "true");
    To copy to clipboard, switch view to plain text mode 

    Unfortunately, I don't receive satisfying outcome. Also, can't understand why in case of sending __EVENTTARGET or __VIEWSTATE, getting this kind of error:
    Qt Code:
    1. 1|#||4|52|pageRedirect||%2ferror.aspx%3faspxerrorpath%3d%2fsha1-decrypt.aspx|
    To copy to clipboard, switch view to plain text mode 
    I can add that my app in the first place, download __VIEWSTATE and __EVENTVALIDATION after connection to website.
    Where can be a problem, and why it happen so as above.

    Thanks in advance,
    Trok
    Last edited by Trok; 5th October 2011 at 15:34.

Similar Threads

  1. HTTP request POST in QT application
    By abdul_moiz in forum Newbie
    Replies: 5
    Last Post: 24th June 2011, 03:48
  2. Request ID of QNetworkaccessmanager get and post request
    By dineshkumar in forum Qt Programming
    Replies: 2
    Last Post: 4th February 2011, 21:56
  3. POST request to a web service
    By QPlace in forum Qt Programming
    Replies: 3
    Last Post: 6th November 2008, 08:05
  4. Https POST Request
    By munna in forum Qt Programming
    Replies: 10
    Last Post: 11th November 2006, 14:24
  5. Qhttp::request(...) method and GET request
    By mikhailt in forum Qt Programming
    Replies: 4
    Last Post: 15th September 2006, 12:26

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.