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

看板C_Sharp (C#)作者 (波吉)時間7年前 (2018/07/16 17:31), 7年前編輯推噓3(302)
留言5則, 3人參與, 7年前最新討論串1/2 (看更多)
使用 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 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 60.248.16.38 ※ 文章網址: https://www.ptt.cc/bbs/C_Sharp/M.1531733482.A.24D.html ※ 編輯: akito117 (60.248.16.38), 07/16/2018 17:33:22 ※ 編輯: akito117 (60.248.16.38), 07/16/2018 17:34:42

07/17 08:09, 7年前 , 1F
是直接塞進iis裡面還是vs開debug?
07/17 08:09, 1F

07/17 09:13, 7年前 , 2F
直接用IIS
07/17 09:13, 2F

07/17 20:48, 7年前 , 3F
先telnet看看該port是否可以通,再檢查一下iis log
07/17 20:48, 3F
※ 編輯: akito117 (59.124.165.46), 07/20/2018 15:21:44

07/20 23:00, 7年前 , 4F
302,404,500
07/20 23:00, 4F

07/22 19:28, 7年前 , 5F
500有錯誤阿,把ErrorMessage或錯誤紀錄打開看
07/22 19:28, 5F
文章代碼(AID): #1RJ6Ng9D (C_Sharp)
文章代碼(AID): #1RJ6Ng9D (C_Sharp)