Problem
If you enabled Multi-Part Upload in your API request, sometimes you may receive following error.
To learn more about Multi-Part Upload check this link.
The remote server returned an error: (500) Internal Server Error.
Response Url: https://your-host/api
Status Code: InternalServerError
Response Body: {"Message":"An error has occurred.","ExceptionMessage":"Unexpected end of MIME multipart stream. MIME multipart message is not complete.","ExceptionType":"System.IO.IOException","StackTrace":" at System.Net.Http.Formatting.Parsers.MimeMultipartBodyPartParser.<ParseBuffer>d__0.MoveNext()\r\n at System.Net.Http.HttpContentMultipartExtensions.MoveNextPart(MultipartAsyncContext context)"}
'
Possible Cause
Your server is expecting CRLF after last boundary in MultiPart request.
Possible Solution
Try to enable following option.
For SSIS
In SSIS REST API Task contains option AddMultiPartPostamble in property Grid (Added in v2.9.8). This option is not in UI so you have to right click on REST API Task and go to Properties and then find option AddMultiPartPostamble, set it to True
For ODBC / Data Gateway
If you are using ODBC Drivers then you can fix this issue two ways
1. Go to Advanced Mode (Grid Mode Option) and Search for MultiPart and set AddMultiPartPostamble property (Added in v1.1.5).
-- OR --
2. You can also use AddMultiPartPostamble option in WITH Clause like below.
SELECT * FROM $
WITH(
Src='http://httpbin.org/post'
,Body='Data=Abcdef'
,AddMultiPartPostamble='True'
,IsMultiPart='True'
)
Contact Us
If you have more question(s) feel free to contact us via Live chat or email to support@zappysys.com
Comments
0 comments
Please sign in to leave a comment.