生のリクエスト文字列を取得する必要があります。以下は、コントローラーに送信される http 要求の例です。実際には、Post データ (最後の行) が必要です。どうすればそれを手に入れることができますか?
自動 JSON モデル バインダーを使用したくないことに注意してください。実際には、生の JSON テキストが必要です
POST http://www.anUrl.com/CustomExport/Unscheduled HTTP/1.1
Accept: application/json, text/javascript, */*; q=0.01
Content-Type: application/json; charset=utf-8
X-Requested-With: XMLHttpRequest
Referer: http://www.anUrl.com/CustomExport
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Host: localhost:8000
Content-Length: 102
Connection: Keep-Alive
Pragma: no-cache
{"runId":"1","fileDate":"8/20/2012","orderStartMinDate":"10/02/2012","orderStartMaxDate":"10/02/2012"}
この最後の行が必要です。これは入らない
var input = new StreamReader(Request.InputStream).ReadToEnd();