PDA

View Full Version : افزایش MaxReceivedMessageSize در wcf



hmahdavi921
سه شنبه 17 اسفند 1395, 09:58 صبح
سلام
در لوکال که میخوام وب سرویسم رو تست بزنم این خطا رو میده. با تغییرات در وب کانفیگ هم حل نشد

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.


<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ICharterService" closeTimeout="00:10:00"
openTimeout="00:10:00" receiveTimeout="00:09:00" sendTimeout="00:55:00"
maxBufferPoolSize="999999999" maxBufferSize="999999999" maxReceivedMessageSize="999999999" />
<binding name="BasicHttpBinding_IFlights" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:27636/CharterService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ICharterService"
contract="CharterMiddleWebService.ICharterService" name="BasicHttpBinding_ICharterService" />
</client>
</system.serviceModel>

Felony
دوشنبه 30 اسفند 1395, 09:12 صبح
علاوه بر MaxReceivedMessageSize باید MaxBufferSize و MaxBufferPoolSize رو هم برای سایز مورد نظر مقداردهی کنید .