We need you!

We're working hard on the next version of Developer Fusion. Let us know what you think we should be up to!

Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Rated
Read 14,572 times

Contents

Related Categories

Edit and Encrypt Web.Config sections using C# 2.0 - Introduction

Introduction

Introduction

ASP.NET 1.x allowed configurations in web.config file to be read from .NET application. But there were no options to manipulate Web.Config contents in programatically. To achieve this we had to consider Web.Config file as a normal file or an xml file. .NET 2.0 fills this gap and also provides many other useful operations to be carried out on Web.Config file; like editing and encrypting sections of Web.Config file. This articles illustrates these functionalities via a sample ASP.NET application. 

Using the code

The classes and methods to take control of the Web.Config file span across 2 namespaces.

  1. System.Configuration
  2. System.Web.Configuration

Each section in the Web.Config file has a corresponding class in either of the namespace. These classes allow modification of corresponding sections. The classes for sections within the "system.web" section are found in System.Web.Configuration. Classes for other sections that are not specific to Web.Config are found in System.Configuration.

Mohammed Habeeb works as a software developer for an India based CMMI L5 Business Solutions Provider InApp Information Technologies situated at technopark. He holds a bachelors in Computer Science Engineering from MES College, Calicut University. He is also a Microsoft Certified Application Developer (MCAD) in .NET Framework. He has a strong inclination towards Microsoft technologies especially the .NET Platform. He is an active member of Microsoft user group, Cochin since 2004. He has a strong passion for science and technology. His interests span through travelling, driving, photography, stamps and coin collection.

Comments