我试图从
Windows窗体客户端应用程序访问WCF服务.我在服务器上的绑定配置是这样的:
<bindings> <customBinding> <binding name="Wrabind" closeTimeout="00:05:00" openTimeout="00:05:00" sendTimeout="00:25:00"> <textMessageEncoding /> <security authenticationMode="SecureConversation" includeTimestamp="true" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"> <localClientSettings maxClockSkew="00:30:00" /> <localServiceSettings maxClockSkew="00:30:00" /> <secureConversationBootstrap messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"> <localClientSettings maxClockSkew="00:30:00" /> <localServiceSettings maxClockSkew="00:30:00" /> </secureConversationBootstrap> </security> <httpTransport maxBufferPoolSize="20000000" maxReceivedMessageSize="20000000" allowCookies="true" maxBufferSize="20000000" /> </binding> </customBinding> </bindings>
如您所见,我已将maxReceivedMessageSize设置为20000000,但仍显示“已超出传入邮件的最大邮件大小配额(65536)”.例外.我错过了什么吗?
解决方法
也许这个错误来自客户端而不是服务器.确保客户端配置中存在相同的设置.