Managing Configuration Data Programmatically in ASP.NET 2.0
page 1 of 6
Published: 07 May 2008
Abstract
This article describes how to manage configuration data programatically through an ad hoc API in ASP.NET 2.0. After providing a brief introduction, Sanjit examines the usage and application of connection strings and encryption with the help of source code. Finally, you will learn the concepts involved with the configuration provider.
by SANJIT SIL
Feedback
Average Rating: 
Views (Total / Last 10 Days): 28104/ 63

Introduction

In ASP.NET 1.0 and 1.1 versions of the Framework provided API's that enabled us to only read information from the configuration file. There is no way to write information into the configuration file. However, ASP.NET 2.0 includes a full configuration management API that enables us to navigate, read and write an application's configuration file. Configuration settings are exposed as a set of strongly typed object against which we can easily program. The management API can be used to read and write configuration settings of remote and local applications. The WebConfigurationManager provides members (AppSettings, ConnectionStrings, OpenWebConfiguration, OpenMachineConfiguration, etc.) and using the methods of those members we can extract information from a configuration file. The sample code snippets have been written in C#.


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-24 5:58:32 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search