【发布时间】:2013-10-27 12:31:14
【问题描述】:
我有 大量 json 需要发布到 自托管 ASP.Net Web API 服务。
我收到“Status Code:413 Request Entity Too Large”消息。
尝试在webapi服务项目的app.config中放入如下内容。
<system.web>
<compilation debug="true" targetFramework="4.0" />
<customErrors mode="Off"/>
<httpRuntime
maxRequestLength="2147483647"
executionTimeout="300" />
</system.web>
这没有帮助。
我正在考虑以下两个选项。
- 可能使用LZW compression library解压javascript中的数据,接收后在webapi端解码。
- 找到一种方法让 webapi 基础架构允许大量数据
我更喜欢第二个选项,但还没有找到如何实现它。
任何指针?
【问题讨论】:
标签: c# json asp.net-web-api xmlhttprequest