How to query maxRequestLength?

B

Brad

I'd like to display the maxRequestLength value on a page, so users could see
what the aprox current file upload size limit is. Can the value of
maxRequestLength be determined at runtime? Can it be done if you don't
know, at runtime, if it's set in the machine config (default) or app web
config?

Thanks

Brad
 
J

Jacob Yang [MSFT]

Hi Brad,

Based on my research and experience, we cannot get the value of
masRequestLength directly at runtime. I have checked the following document.

Accessing ASP.NET Configuration Settings
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpgrfaccessingaspnetconfigurationsettings.asp
"...
You can access public configuration settings from within an ASP.NET
application..."

My suggestion is looking the web.config or machine.config file as a common
XML file. Then we can use the System.Xml.XmlDocument class to get what we
want.

Does it answer your question? If I have misunderstood your concern, please
feel free to let me know.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top