2 // System.Web.Configuration.HttpRuntimeConfig
5 // Gonzalo Paniagua Javier (gonzalo@ximian.com)
7 // (C) 2003 Novell, Inc. (http://www.novell.com)
11 using System.CodeDom.Compiler;
12 using System.Collections;
13 using System.Configuration;
18 namespace System.Web.Configuration
20 sealed class HttpRuntimeConfig
22 public int ExecutionTimeout = 90; // seconds
23 public int MaxRequestLength = 4096; // KB
24 public int RequestLengthDiskThreshold = 256; // KB
25 public bool UseFullyQualifiedRedirectUrl = false;
26 public int MinFreeThreads = 8;
27 public int MinLocalRequestFreeThreads = 4;
28 public int AppRequestQueueLimit = 100;
29 public bool EnableKernelOutputCache = true;
30 public bool EnableVersionHeader = true;
31 public bool RequireRootSaveAsPath = true;
32 public int IdleTimeout = 20; // minutes
33 public bool Enable = true;
34 public string VersionHeader;
36 /* Only the config. handler should create instances of this. Use GetInstance (context) */
37 public HttpRuntimeConfig (object p)
39 HttpRuntimeConfig parent = p as HttpRuntimeConfig;
44 static public HttpRuntimeConfig GetInstance (HttpContext context)
46 HttpRuntimeConfig config;
48 context = HttpContext.Context;
50 config = context.GetConfig ("system.web/httpRuntime") as HttpRuntimeConfig;
53 throw new Exception ("Configuration error.");
58 void Init (HttpRuntimeConfig parent)
60 ExecutionTimeout = parent.ExecutionTimeout;
61 MaxRequestLength = parent.MaxRequestLength;
62 RequestLengthDiskThreshold = parent.RequestLengthDiskThreshold;
63 UseFullyQualifiedRedirectUrl = parent.UseFullyQualifiedRedirectUrl;
64 MinFreeThreads = parent.MinFreeThreads;
65 MinLocalRequestFreeThreads = parent.MinLocalRequestFreeThreads;
66 AppRequestQueueLimit = parent.AppRequestQueueLimit;
67 EnableKernelOutputCache = parent.EnableKernelOutputCache;
68 EnableVersionHeader = parent.EnableVersionHeader;
69 RequireRootSaveAsPath = parent.RequireRootSaveAsPath;
70 IdleTimeout = parent.IdleTimeout;
71 Enable = parent.Enable;