Access httpRuntime maxRequestLength software

I looked through and found a way to synchronize between the configuration section for file size and maximum resolution. Is it possible?

Is it best to allow very large file sizes in the web.config file and then apply smaller sizes in your implementations?

+3
source share
1 answer

Try something like this:

HttpRuntimeSection section = ConfigurationManager.GetSection("system.web/httpRuntime") as HttpRuntimeSection;

So you get section.MaxRequestLength

+1
source

Source: https://habr.com/ru/post/1795363/


All Articles