error writing mime multipart body part to output stream

夙愿已清 提交于 2020-02-18 07:40:08

问题


I have code that does async file uploads which works fine on my dev vm but after I deployed it to the client system, I keep getting this error:

"error writing mime multipart body part to output stream"

I know this is the line that is throwing the error but I can't seem to figure out why:

//Read the form data and return an async task.
await Request.Content.ReadAsMultipartAsync(provider);

The file size was only 1MB and I even tried different file types with much smaller sizes. Why would this occur, I need ideas


回答1:


Since the error message is mentioning about an error while writing to output stream, can you check if the folder to where the response is being written out has necessary permissions for your application to write.




回答2:


You can also get this error if a file with the same name already exists in the destination folder.




回答3:


I had this issue but I had already set permissions on the destination folder.

I fixed the problem by setting permissions on the App_Data folder (I think this is where the file gets temporarily stored after being uploaded).



来源:https://stackoverflow.com/questions/24196280/error-writing-mime-multipart-body-part-to-output-stream

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!