[問題] Request.InputStream收資料的問題

作者: akito117 (宗益)   2018-07-16 17:31:19
使用
Stream req = Request.InputStream;
req.Seek(0, SeekOrigin.Begin);
string json = new StreamReader(req).ReadToEnd();
收json的封包
使用Ajax.Post發送的話,收的到資料
但是用平版APP程式發送的話,收不到資料
我在兩台主機上有裝一樣的程式
A主機收的到APP資料,B主機收不到APP資料
B主機之前有重灌過VS2017,不知道有沒有影響
想不出那裡設定有動到
希望能幫小弟解一下,感謝(‵・ω・′)ゞ
IIS Log長這樣
2018-07-20 07:13:24 192.168.1.95 POST /DryPump/Api/TBD - 80 - 192.168.1.52
okhttp/3.8.1 - 302 0 0 4819
2018-07-20 07:13:24 192.168.1.95 GET /DryPump/Api/TBD
AspxAutoDetectCookieSupport=1 80 - 192.168.1.52 okhttp/3.8.1 - 302 0 0 9
2018-07-20 07:13:24 192.168.1.95 GET /DryPump/Api/TBD
AspxAutoDetectCookieSupport=1 80 - 192.168.1.52 okhttp/3.8.1 - 404 0 0 158
2018-07-20 07:14:12 192.168.1.95 POST /DryPump/Api/TBD - 80 - 192.168.1.52
okhttp/3.8.1 - 500 0 0 10214
2018-07-20 07:14:15 192.168.1.95 POST /DryPump/Api/TBD - 80 - 192.168.1.52
okhttp/3.8.1 - 500 0 0 17
2018-07-20 07:15:40 192.168.1.95 POST /DryPump/Api/TBD - 80 - 192.168.1.52
okhttp/3.8.1 - 500 0 0 9083
作者: free112136 (Free)   2018-07-17 08:09:00
是直接塞進iis裡面還是vs開debug?
作者: akito117 (宗益)   2018-07-17 09:13:00
直接用IIS
作者: free112136 (Free)   2018-07-17 20:48:00
先telnet看看該port是否可以通,再檢查一下iis log
作者: Litfal (Litfal)   2018-07-22 19:28:00
500有錯誤阿,把ErrorMessage或錯誤紀錄打開看

Links booklink

Contact Us: admin [ a t ] ucptt.com