2

所以我在来自https://github.com/stewartm83/angular-fileupload-sample的 c# 中使用 ng-file-upload 遇到了这个错误。如果我运行他的现场演示,我可以看到相同的问题,即无法上传较大的图像。

 System.IO.IOException: Error reading MIME multipart body part. ---> System.Web.HttpException: The client disconnected.

我相信这是由于您上传的图片的大小。当我在Demo中上传大图时,好像只上传了1/8的图片。我尝试将

<httpRuntime targetFramework="4.5" maxRequestLength="30000000"> and <security> <requestFiltering> <requestLimits maxAllowedContentLength="30000000"> </requestFiltering> </security>

进入您的 WebConfig 文件,但对许多其他解决方案都没有运气。有趣的是,您正在让客户端断开连接,这是我没有预料到的。我还没有找到解决方案,所以如果有人有线索,那就太好了。

4

0 回答 0