Get maxRequestLength value from specific location path in config
问题 I have several different maxRequestLengths set for different location paths. How do I get the value of the specific location path that I am looking for? Here is what is in config: 回答1: Check this out using System; using System.Collections; using System.Configuration; class DisplayLocationInfo { static void Main(string[] args) { Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); ConfigurationLocationCollection myLocationCollection = config.Locations;