我有一个用于上传文件的Flash组件,希望在客户端处理最大文件大小限制,而不实际将文件发送到服务器。因此,我需要以某种方式从配置文件中读取该值以发送给客户端。我找到的一些文章说直接读取配置文件并不是解决方案,因为它可能会在很多地方被更改。因此,可能应该有一些API调用,但我找不到任何相关的信息...
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1048576" />
</requestFiltering>
</security>
</system.webServer>
system.web/httpRuntime
中的 "maxRequestLength" 而不是system.webServer/security/requestFiltering/requestLimits
中的 "maxAllowedContentLength"。 - user57508