dongnong3019 2012-04-18 00:48
浏览 178


I am trying to achieve a successful POST to an ASPX (ASP.NET) page (an external site) using cURL.

Since I don't care much for the looks of the page (it is all done on the server side), I am not sending ANY the arguments __VIEWSTATE, __EVENTVALIDATION, __EVENTTARGET, and __EVENTARGUMENT, not even empty, but I do send the real data.

How crucial is it to POST these arguments to the ASP.NET server?

I am not an ASP.NET programmer, but I might suspect that __EVENTVALIDATION might give me some hard time here(?). Or is this something between the browser and the server that I don't need to care much for?

If this is crucial, how can I imitate these variables so the server accepts POSTS?

  • 写回答

2条回答 默认 最新

  • dongyuqie4322 2012-04-18 01:22

    In general, you can not eliminate these values.

    The ViewState and the EventValidation are critical - unless the other side has disabled them. If the other side use them and do not find them on postback, a throw error appears, and it depends on the program how it handles it.

    The ViewState contains information that the page needs to use after the postback.

    The EventValidation contains a key that validates the postback controls to be sure that you do not try to trigger any command that does not have permission, or send any argument that does not have permission to run.

    Let's gives you an example: Let's say that I have a control that send a number, 43, and a button that trigger the postback, and I ask the information for id 43. The EventValidation takes care that you can not make a script and ask for all the numbers with any id and get any result that you may think.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?



  • ¥15 关于模型训练的一个问题
  • ¥15 装了几千台服务器从来没遇到这种问题,哎看下哪位帮我解决吧
  • ¥15 单片机程序上的困难问题
  • ¥15 请教某软件缓存Ts文件破解合并mp4的方法
  • ¥15 求小游戏炸弹人中关于敌人的C++代码
  • ¥15 拿到这个服务器最高权限有偿
  • ¥50 来个抓app跳转支付宝转链接的
  • ¥15 remotes安装提示没有description文件
  • ¥15 AttributeError: 'NoneType' object has no attribute 'drop_duplicates'报错
  • ¥15 以下代码,运行结果报错