I know that sending the request in GET method will solve this problem

No, I don't think so. It has been awhile since I accessed an MS ASP.NET website, but basically when you get the web page, it will contain a "viewstate". This is a very long string that represents what you are doing on the website, like what page you are looking at now, who are, etc. You need to use POST, not GET. When you send your POST, you need to "barf back" verbatim the latest "viewstate" that you received. When you get a reply page, you will get a new "viewstate" string. When you send the next request, you need to post this latest "viewstate".

The basic idea of a "viewstate" is that the client keeps track of what is going on instead of the server. You as the client are acting as distributed storage for the server. For you, this string is absolutely meaningless. Just get it, save it and use it for the next request.

Update:

I just looked at a typical "viewstate". It is 182 lines (formatted like below, of course there are no line breaks in this string) of gibberish. You don't have to decode this, but you do have to barf it back to the server when you send a request. And you will get a new viewstate in the resulting page.

viewstate is: "/wEPDwUKMTM0NjAxNTIwMA9kFgQCAQ9kFhACAQ8PFgIeBFRleHRlZGQCAw8PFgQfAAUHU +2l nbiBJbh4LTmF2aWdhdGVVcmwFPC9Mb2dpbi5hc3B4P1JFRkVSUkVSPS9teVVTR0JDL01lb +WJ lcnMvTWVtYmVyc0RpcmVjdG9yeS5hc3B4P2RkAgUPFgIfAAWUIDx1bCBjbGFzcz0nbmF2J +yB pZD0nbmF2MSc+PGxpPjxhIGNsYXNzPSdtZW51X3RpdGxlJyBpZD0nbGVlZF9idG4nIGhyZ +WY 9Jy9MRUVEJz5MRUVEPC9hPjx1bCBjbGFzcz0nc21lbnUnPjxsaT48YSBocmVmPSdodHRwO +i8 vd3d3LnVzZ2JjLm9yZy9EaXNwbGF5UGFnZS5hc3B4P0NNU1BhZ2VJRD0xOTg4Jz5JbnRyb +zw vYT48L2xpPjxsaT48YSBocmVmPSdodHRwOi8vd3d3LnVzZ2JjLm9yZy9EaXNwbGF5UGFnZ +S5 ... total of 182 lines like this .... "

In reply to Re: Validation of viewstate MAC failed by Marshall
in thread Validation of viewstate MAC failed by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.