WEB.CONFIG最大消息长度 [英] WEB.CONFIG MAX MESSAGE LENGTH
问题描述
I'm posting a json object with large amount of text. 下面是我当前的 Below is my current 这很紧急,请尽快答复.谢谢! This is urgent, pls reply fast. thanks! 2097151 = 2GB这是允许的最大值 2097151 = 2GB This is the maximum value allowed 如此设置 maxRequestLength,maxBufferSize,maxBufferPoolSize,maxReceivedMessageSize改为
2147483647 maxRequestLength,maxBufferSize,maxBufferPoolSize,maxReceivedMessageSize to
2147483647 使用ReaderQuotas如下. < readerQuotas
maxDepth = " 2147483647"
maxStringContentLength = " ; 2147483647"" <readerQuotas
maxDepth="2147483647"
maxStringContentLength="2147483647" 注意 主要缺点是可能容易受到攻击-例如恶意源现在可以用最多2 GB的邮件淹没您的Web服务器,并有可能将其清除. The main drawback is a potential vulnerability to attacks - e.g. a malicious source can now flood your webserver with message up to 2 GB in size and potentially bring it down. 当然,允许2 GB的消息还会对服务器的内存消耗造成一定的压力,因为这些消息需要完全在内存中组装(除非您在WCF中使用流协议).如果您有10个客户端向您发送2 GB的邮件,
您的服务器上将需要大量RAM! :-) Of course, allowing 2 GB messages also puts some strain on your server in terms of memory consumption, since those messages need to be assembled in memory, in full (unless you use streaming protocols in WCF). If you have 10 clients sending you 2 GB messages,
you'll need plenty of RAM on your server! :-) 除此之外,我没有看到任何实际问题. Other than that, I don't see any real issues. 这篇关于WEB.CONFIG最大消息长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!web.config
. How should I modify to change message size to post large json?推荐答案
maxArrayLength = " ; 2147483647""
maxBytesPerRead = " ; 2147483647""
maxNameTableCharCount = " ; 2147483647""
/>
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647"
/>