【问题标题】:WCF webhttp service using JSON increasing message size使用 JSON 增加消息大小的 WCF webhttp 服务
【发布时间】:2011-06-14 08:35:32
【问题描述】:

我正在使用 ASIFormDataRequest 将 JSON 格式的图像发布到基于 “WCF REST 服务模板 40(CS)” 的 WCF REST 服务。它适用于小于 WCF 服务@65536 字节默认消息大小的图像,但我想增加该值。

我看到的所有示例都添加了具有更高 maxReceivedMessageSize 等的 webHttpBinding,以及使用该 bindingConfiguration 的 服务端点。但是,使用此模板,我无法在端点标记中指向 .svc 或接口。

编辑:抱歉,我可以使用 standardEndpoint 标签修复它:

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

【问题讨论】:

    标签: wcf json maxreceivedmessagesize


    【解决方案1】:

    我也有同样的问题。我已经用尽了我能找到的每一个消息大小设置,但我仍然遇到同样的问题。我怀疑我的服务出于某种原因甚至没有使用这些设置。当然可以使用一些帮助。谢谢!这是我的“标准端点”:

     <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>
    

    【讨论】:

    • 您使用的是“WCF REST 服务模板 40(CS)”模板吗?
    • BrainMan,我用您共享的配置解决了同样的问题,从“WCF REST 服务模板 40(CS)”模板开始。
    猜你喜欢
    • 2020-10-06
    • 2010-11-14
    • 1970-01-01
    • 1970-01-01
    • 2014-06-24
    • 2011-12-29
    • 1970-01-01
    • 2015-04-02
    • 1970-01-01
    相关资源
    最近更新 更多