ASP.Net WebAPI Return value for PDF Form Submit
问题 How do I get my Asp.net webapi to return the correct response for a pdf form submit? 回答1: To keep the response inside of the pdf application you must return an FDF formatted file. The key to get this to work is that you cannot just return a string. You must first encode it to a memory stream and the header must be set to application/vnd.fdf . Here is the example code: Public Function PostValue(<FromBody()> ByVal value As MyPDFFieldsObject) As HttpResponseMessage Dim fdfmessage As String = "