[英]Error: 413 “Request Entity Too Large” Html + MVC WCF service
您可以像这样在 WCF 中设置接收文件的最大限制:
WebServiceHost webServiceHost = new WebServiceHost(typeof(UploadService), uri);
WebHttpBinding binding = new WebHttpBinding();
binding.MaxReceivedMessageSize = Int32.MaxValue;
webServiceHost.AddServiceEndpoint(typeof(IUploadService), binding, "WebServiceHost");
webServiceHost.Open();
您可以尝试在 HTML web.config 中设置上传大小限制。
我花了1-2天后找到了解决方案。 看看这个 url
https://cmatskas.com/upload-files-in-asp-net-mvc-with-javascript-and-c/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.