WebRequest POST with both file and parameters

前端 未结 3 1300
感动是毒
感动是毒 2021-01-02 00:07

I\'m trying to upload a file and a send along a few parameters to my site using .NET / C#. Having read a few tutorials that do either a few parameters or a file, I\'ve tried

3条回答
  •  攒了一身酷
    2021-01-02 00:19

    I guess the immediate problem is a mismatch between the declared and the actual length.

    Where did you miscalculated I am not sure but if I remember correctly the length should include every byte of the response (including headers) except for the first line.

    To be sure I would build a simple html page to generate the post you want and examined the post with fiddler (or firebug)

提交回复
热议问题