【发布时间】:2015-02-03 08:23:13
【问题描述】:
我在运行应用程序时收到以下消息: 已超出传入邮件 (65536) 的最大邮件大小配额。要增加配额,请在适当的绑定元素上使用 MaxReceivedMessageSize 属性。
<configuration>
<connectionStrings>
<add name="abc" connectionString="Data Source=xyz;Initial Catalog=abc;Persist Security Info=True;User ID=abc;Password=abc"/>
</connectionStrings>
<system.web>
<compilation debug="true"/>
<globalization uiCulture="en-GB" culture="en-GB"/>
<system.serviceModel>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
<bindings>
<basicHttpBinding>
<binding name="PictureBinding" maxReceivedMessageSize="2000000" maxBufferSize="2000000">
<readerQuotas
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="WCFservice.Service1Behavior">
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="WCFservice.Service1Behavior" name="WCFservice.Service1">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="PictureBinding" contract="WCFservice.IService1">
</endpoint>
<endpoint address="web" binding="webHttpBinding" contract="WCFservice.IService1">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
【问题讨论】:
标签: c# .net wcf configuration