<< [ASP.NET] ASP.NETの実行タイムアウト | main | [ASP.NET] パスの活用 >>

2005/07/13 (水)

[ASP.NET] web.config構成ファイル設定値の取得

'httpRuntimeセクション値を取得する
Dim o As Object = _
System.Configuration.ConfigurationSettings.GetConfig("system.web/httpRuntime")

Dim p As System.Reflection.PropertyInfo = _
o.GetType().GetProperty("MaxRequestLength", System.Reflection.BindingFlags.NonPublic Or System.Reflection.BindingFlags.Instance)

Dim maxRequestLength As Integer = p.GetValue(o, Nothing)