Search code examples
c#configuration-fileskey-valuemaxlength

Max key/value length in 'application configuration' files


What's the maximum allowed length for MyKey and MyValue in a configuration file?

<configuration>
  <appSettings>
    <add key="MyKey" value="MyValue" />
  </appSettings>
</configuration>

Solution

  • As per knowledge there is no limitation to key value pair in webconfig file .....

    if you are planning to add object to config file check this post will help you to achieve your task

    How to store custom objects in web.config ?