开发者

WCF webhttp service using JSON increasing message size

I'm using ASIFormDataRequest to POST an image in JSON format to a WCF REST service based on the "WCF REST Service Template 40(CS)". It works fine for images smaller than the default message size of the WCF service @65536 bytes, but I want to increase that value.

All the examples I've se开发者_如何学Pythonen have added a webHttpBinding with a higher maxReceivedMessageSize etc, together with a service endpoint using that bindingConfiguration. However, with this template there's no .svc or interface that I can point to in the endpoint tag.

EDIT: Sorry, I was able to fix it using the standardEndpoint tag:

<standardEndpoint name="" helpEnabled="true" maxBufferPoolSize="1500000" maxReceivedMessageSize="1500000" transferMode="Streamed" automaticFormatSelectionEnabled="true"/>


I'm having the same problem. I've maxed out every message size setting I can find, and I'm still running into the same problem. I'm suspicious that my service is not even using these settings for some reason. Sure could use some help. Thanks! Here's my "standardEndpoint":

 <standardEndpoints>
  <webHttpEndpoint>
    <standardEndpoint name="WebHTTP" maxBufferSize="2147483647"  maxReceivedMessageSize="2147483647" maxBufferPoolSize="0" helpEnabled="true" automaticFormatSelectionEnabled="true" faultExceptionEnabled="true">
      <readerQuotas maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"  maxDepth ="2147483647" />
    </standardEndpoint>
  </webHttpEndpoint>
</standardEndpoints>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜