Encrypting and Decrypting Configuration File
page 1 of 5
Published: 21 Mar 2007
This article exposes the powerful feature of ASP.Net 2.0 that encrypts and decrypts all the configuration sections of configuration file.
by Uday Denduluri
Average Rating: 
Views (Total / Last 10 Days): 30184/ 70


Configuration file is a well formed XML file that would have all the settings of the application (both Windows and Web). For Web Application the configuration file is web.config and for windows application the configuration file is App.config. The file can be in ANSI, UTF-8, or Unicode. The system automatically detects the encoding. The root element of the Web.Config is always <configuration> tag. The section for the configuration file looks like the listing defined below.

Listing 1

<!-- All Configuration settings to be here-->

View Entire Article

User Comments

Title: Good one..   
Name: Gourik Kumar Bora
Date: 3/4/2009 1:03:41 AM
Its really good .can you please tell me how can i ensure that asp.net worker process will modify the web.config.
thanks in advance
Title: Encrypting and decrypting a configuration file   
Name: Nitin Dixit
Date: 7/26/2007 3:46:41 AM
Dear Uday,
How can i use my configuration after encryption?
Means lets suppose we have a connectionstring of my application and i encrypt that particular config section.
Now in my code behind how can i use it??????

thanks & Regards
Nitin Dixit

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

©Copyright 1998-2015 ASPAlliance.com  |  Page Processed at 10/9/2015 11:38:03 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search