Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to retrieve the value of maxRequestLength in the web.config ?

Reply
Thread Tools

How to retrieve the value of maxRequestLength in the web.config ?

 
 
toto@titi.com
Guest
Posts: n/a
 
      11-08-2004
Example:
<configuration>
<system.web>
<httpRuntime maxRequestLength="2048" />
</system.web>
</configuration>

I need to kno in my code the value of key maxRequestLength.
Thanks in advance.
 
Reply With Quote
 
 
 
 
Karl Seguin
Guest
Posts: n/a
 
      11-08-2004
Some web.config variables accessible through the framework, like
System.Web.SessionState.SessionStateMode, others, such as the
maxRequestLength are not (as far as I know). Therefore, the only solution
you'll have is to parse the web.config and jump to the value with an
xpath....the good news is since the worker process would restart itself
whenever that file changes, you can do it once in Application_Start and
store the value from that point on...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Example:
> <configuration>
> <system.web>
> <httpRuntime maxRequestLength="2048" />
> </system.web>
> </configuration>
>
> I need to kno in my code the value of key maxRequestLength.
> Thanks in advance.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to intercept error when httpRuntime maxRequestLength is exceded. moondaddy ASP .Net 25 08-30-2004 09:00 AM
httpRuntime - MaxRequestLength - 404 error Goncalo ASP .Net 2 01-07-2004 06:16 PM
how do I get the value of httpruntime.maxRequestLength through code? Peter Row ASP .Net 1 12-04-2003 08:39 AM
How to query maxRequestLength? Brad ASP .Net 1 11-27-2003 05:59 AM
Setting maxRequestLength for upload file sizes David Stephen ASP .Net 2 07-10-2003 07:08 AM



Advertisments