IIS 7的默认最大POST请求的大小 - 如何提高64KB / 65KB的限制? [英] Maximum default POST request size of IIS 7 - how to increase 64kB/65kB limit?

查看:3014
本文介绍了IIS 7的默认最大POST请求的大小 - 如何提高64KB / 65KB的限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了ASP.NET的C#一个RESTful Web发布服务和IIS托管服务。

I have created a RESTful POST web service in ASp .net C# with IIS hosting the service.

我的服务接受一个XML文件作为输入,当大小超过65KB我收到以下错误信息:

My service accepts an XML file as input and when the size exceeds 65KB I get the following error message:

远程服务器返回错误:(400)错误的请求

我的问题是双重的,首​​先是有由IIS服务器POST请求设置默认的限制,二来我怎么可以更新此?

my question is two fold, first is there a default limit set by the IIS server for POST requests and secondly how can I update this?

非常感谢

推荐答案

约翰·凯伦的答案是正确的,但对我来说我有一个终点定义,因此设置maxReceivedMessageSize不得不如下:

John Källén's answer was correct, but in my case I had an end point defined so setting the maxReceivedMessageSize had to be as follows:

<standardEndpoints>
    <webHttpEndpoint>
        <standardEndpoint name="" 
                         helpEnabled="true" 
                         automaticFormatSelectionEnabled="true"                   
                         maxReceivedMessageSize="2147483647">
        </standardEndpoint>
    </webHttpEndpoint>
</standardEndpoints>

这篇关于IIS 7的默认最大POST请求的大小 - 如何提高64KB / 65KB的限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆