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

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

问题描述

我在 ASp .net C# 中创建了一个 RESTful POST 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) Bad Request.

我的问题有两个,首先是 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?

非常感谢

推荐答案

John Källén 的回答是正确的,但就我而言,我定义了一个端点,因此设置 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天全站免登陆