Understanding Configuration Files

Most software applications need to maintain bits of information about how the software is supposed to run. Web applications are no different.

In ASP.old, you had a limited number of ways to manage application configuration data. You could

  • Embed configuration data in the registry and hope that the person who deploys your application can insert the necessary registry settings properly.

  • Use script files such as global.asa or constants located in your own script files.

  • Use custom text files that could be read and written to as needed.

All three of these techniques have significant drawbacks. Registry-based configuration is difficult to manage. Changing a script file often requires a programmer, and errors inserted ...

Get C#® Developer's Guide to ASP.NET, XML, and ADO.NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.