C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » .NET Framework »

Encrypting Sections in Web.config File


Posted Date: 10 Feb 2009    Resource Type: Articles    Category: .NET Framework
Author: ShankarMember Level: Diamond    
Rating: 1 out of 5Points: 10



This article will helps u to encrypt certain sections of the config file that are very sensitive for the webapplication.
This will hide certain valid information from unwanted users.
I had read similar kind of article in this site few days back.
But there is one more option of encrypting certain sections of the config file.
This will not register anything in the registry.
The values available in the those config sections will be encrypted.The asp.net application will itself decrypt the encrypted string and use that for running the application.

For encrypting the Connectionstrings section



aspnet_regiis.exe -pef "connectionStrings" "." -prov "DataProtectionConfigurationProvider"


For encrypting the appsettings section


aspnet_regiis.exe -pef "appSettings" "." -prov "DataProtectionConfigurationProvider"



this code can be directly executed in the visual studio command prompt or it can be written as a bat file.Then on executing the bat file this statement will be executed.

The sections are encrypted to cipher data using the windows dataprotection API's.
This encryption is also machine specific.so the encrypted file cannot be copied to another machine.so this Encryption has to be executed individually for every machine.





Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Encryption of web.config  .  Encryption of Config file  .  Encrypting Config sections  .  Connectionstrings  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: How to Test Anonymous Type Equality - LINQ: A Step Ahead Series
Previous Resource: LINQ QUerry : A Step Ahead Series
Return to Discussion Resource Index
Post New Resource
Category: .NET Framework


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use