Using the Configuration Class
When you use one of the WebConfigurationManager Open
methods—such as the OpenMachineConfiguration()
or OpenWebConfiguration()
methods—the method returns an instance of the Configuration
class. This class supports the following properties:
• AppSettings
—
Returns the appSettings
configuration section.
• ConnectionStrings
—
Returns the connectionStrings
configuration section.
• EvaluationContext
—
Returns an instance of the ContextInformation
class that enables you to determine the context of the configuration information.
• FilePath
—
Returns the physical file path to the configuration file.
• HasFile
—
Returns True
when there is a file that corresponds to the configuration information.
• Locations
—
Returns a list of locations ...
Get ASP.NET 4 Unleashed 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.