var section = HttpContext.Current.GetSection("system.web/httpRuntime") as System.Web.Configuration.HttpRuntimeSection;
will get you httpRuntime settings for currently executing page.
Configuration config = WebConfigurationManager.OpenWebConfiguration("~/Default.aspx");
HttpRuntimeSection o = config.GetSection("system.web/httpRuntime") as HttpRuntimeSection;
will get you settings for a given virtual path.