Runtime Settings

Runtime Settings

httpRuntime Attributes

  • executionTimeout="[seconds]" - time in seconds before request is automatically timed out
  • maxRequestLength="[KBytes]" - KBytes size of maximum request length to accept
  • useFullyQualifiedRedirectUrl="[true|false]" - Fully qualifiy the URL for client redirects
  • minFreeThreads="[count]" - minimum number of free thread to allow execution of new requests
  • minLocalRequestFreeThreads="[count]" - minimum number of free thread to allow execution of new local requests
  • appRequestQueueLimit="[count]" - maximum number of requests queued for the application If you modify the maxRequestLength setting, you should also change the Media.MaxSizeInDatabase setting so that it is less than httpRuntime.maxRequestLength.

Runtime Settings Configuration

    • <configuration>
      • <sitecore>
        • <system.web>
          • <httpRuntime maxRequestLength="512000" executionTimeout="600" enableKernelOutputCache="false" />

Runtime Settings C# Web Control Code

Sitecore.Data.Items.Item item = Sitecore.Context.Item;
if (item == null) return;

output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Style, "font-weight:bold; width:100%; clear:both");
output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Div);
output.Write("C# Web Control Real-time Output");
output.RenderEndTag();

output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Style, "font-size:x-small; width:100%; clear:both");
output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Div);
output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Style, "font-weight:bold");
output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.P);
//using &#58; for colon and &#160; for space
output.Write("{0}&#58;&#160;{1}", "Item", item.DisplayName);
output.RenderEndTag(); //P

string maxRequestLength = Sitecore.Configuration.Settings.Runtime.MaxRequestLength.ToString();
string effectiveMaxRequestLengthBytes = Sitecore.Configuration.Settings.Runtime.EffectiveMaxRequestLengthBytes.ToString();

output.Write("{0}&#58;&#160;{1}", "Maximum Request Length", "<b>" + maxRequestLength + "</b><br/>"); 
output.Write("{0}&#58;&#160;{1}", "Effective Maximum Request Length Bytes", "<b>" + effectiveMaxRequestLengthBytes + "</b>");
output.RenderEndTag(); //Div


Runtime Settings C# Web Control Output

Maximum Request Length: 512000
Effective Maximum Request Length Bytes: 524083200