尝试上传大文件时获取exception

我正在使用wshttpbinding来提供服务

            

当我尝试上传15Mb的文件时,它会抛出下面的EndPointNotFoundException:

例外消息:

 There was no endpoint listening at "MY SERVICE URL" that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. 

例外:

 The remote server returned an error: (404) Not Found. 

在您的WCF配置中,服务器端有(2)个设置maxRequestLengthmaxAllowedContentLength ,您需要增加这些设置才能解决此exception。 在WCF服务服务器端的.config中,请确保添加以下内容:

             

上传限制设置为2级,应用程序设置为第1级,服务器设置为第2级。

您的应用配置对我来说很好。

检查machine.config文件中定义的IIS设置。 我找到了一篇Microsoft KB文章来配置它

您可以在任何这些位置配置值。