调用我的服务时出现以下错误;
The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.
服务的配置是;
<bindings>
<basicHttpBinding>
<binding name="basic" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" >
<readerQuotas maxDepth="32" maxStringContentLength="67108864" maxArrayLength="10240000" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="Company.Product.Service.FileManager.IFileManager">
<endpoint binding="basicHttpBinding" bindingConfiguration="basic" name="FileManager" bindingNamespace="Company.Product.FileManager.FileManagerService" contract="Company.Product.Service.FileManager.IFileManager" />
<host>
<baseAddresses>
<add baseAddress="http://filemanager.dev.v7.services.Company.net" />
</baseAddresses>
</host>
</service>
</services>
正如你所看到的,我已经相应地调整了设置,所以不知道为什么我仍然收到这个错误。
客户端配置;
<bindings>
<basicHttpBinding>
<binding name="basic" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="32" maxStringContentLength="67108864" maxArrayLength="10240000" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://filemanager.dev.v7.services.Company.net/service.svc" binding="basicHttpBinding" bindingConfiguration="basic" contract="Company.Product.Service.FileManager.IFileManager" name="FileManager"/>
</client>
更新
将服务配置更改为此(删除绑定名称),这现在可以工作,但为什么它不能与命名配置一起工作;
<bindings>
<basicHttpBinding>
<binding name="" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" >
<readerQuotas maxDepth="32" maxStringContentLength="67108864" maxArrayLength="10240000" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</binding>
</basicHttpBinding>
</bindings>