.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

httpRuntime - maxRequestLength vs requestLengthDiskThreshold?

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :ASP.Net

Hi All,


This maybe the wrong place to post this question but I am looking at it from an architecture perspective. This question has been asked before from search on the forum but it was not answered so I am posting it again.


What is the difference between "maxRequestLength" and "requestLengthDiskThreshold"? Like in the case below.

<httpRuntime executionTimeout="300" maxRequestLength="20000" useFullyQualifiedRedirectUrl="false" requestLengthDiskThreshold="8192"/>

There are lots of conflicting information on the net and would like to know what effect I will have on a website by adding this key.

BTW - This would go in the web.config file for those that do not know.





View Complete Post

More Related Resource Links

doesn't work (using IIS 6.0)

HiI'm getting errors with an application on our test web server, which has .NET 4.0 installed, when I input HTML into a form.  I get the usual errors of:A potentially dangerous Request.Form value was detected from the clientThis is being caused by the change in .NET 4.0 that disables switching off automatic validation for HTML input.I can fix this on my local development machine by adding the <httpRuntime requestValidationMode="2.0" /> directive to the <system.web> section of my root web.config, and .NET then honours the <pages validateRequest="false" /> directive that's in the same root web.config.  Strangely, I needed to restart IIS on my local machine (which is version 5.1) for this change to work.When I deploy the root web.config to our test server however, I'm still getting the validation errors.  I've tried using run > iisreset, stopping and starting IIS (which is version 6.0 on the test server), and I've even restarted the server to fully clear out .NET.  My application is definitely picking up the new root web.config (I've tested this), however the <httpRuntime requestValidationMode="2.0" /> directive seems to just be ignored.My application is configured as a  .NET 4.0 application on both my local machine and on the test server.  I've tried rebuilding the a

HttpRuntime.Cache problem

I'm using the code below (a shortened version as a test). It is invoked on application start and collects data for use by the individual sessions.  The problem I'm having is it doesn't work on one machine but is fine on the other Is using .Clone the correct way of caching or is that the cause of my problems?   Public Shared Sub LoadGroups()                  Dim arrGroups As New ArrayList          for i = 1 to 100               arrGroups.Add("test" & i) Next        HttpRuntime.Cache("Groups") = arrGroups.Clone       Thread.Sleep(2000)  End Sub 

httpRuntime executionTimeout value not applied



I'm working on Windows 2008R2 with IIS 7.5. In web.config there is config value:

httpRuntime executionTimeout="90"

Now, web request calls WCF service, which is very time consuming (timeouts for WCF are set to 5minutes). Whilst waiting for WCF to finish, web application throws exception:

Exception Type:        System.Web.HttpException
Exception Message:     Request timed out.
Exception Source:      
Exception Target Site: Target Site unavailable

As far as I make it out, it's exception caused by exceeding 90seconds limit. But... I get that exception after about 150seconds. Is it common that request doesn't break instantaneously?

I did some tests:

- set executionTimeout

HttpRuntime.Cache IIS problem?


I get the leisure of debugging someone elses project in which a customer logins and gets their status page. Now this status page shows redeemed information, but the odd thing is if you refresh several times you could possibly get someone elses information. It just happens randomly to, but I would hit F5(refresh) and check it several times and it would be a completely different item and then repeat that it would be back to normal. I did this for about 2-3 minutes and it would be totally random. Now my question is he is using HttpRuntime cache to store this information at login and then retrieving them from HttpContext.Current.Session.  Is there a setting in IIS that could be causing me to get someone elses cached item?

Also there needs to be several numbers stored(up to 4) and pass to a few pages on the site. Is there a more effient way rather than using HttpRuntime.Cache and passing it a array list of a created Class Type?

How to determine HttpRunTime.Cache runtime size


Hi guys,

How do we get/measure the memory consumption of the cache in System.Web.HttpRunTime.Cache class in c#. I need to know the size of the cache at a certain interval in order to flush the cache to prevent cache from hogging too many resources. I understand there's absoluteExpiration, slidingExpiration, cacheDependencies but those doesn't fit into my use case.

Thanks in forward,

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend