Posts

Showing posts from June 21, 2015

How to Encrypt web.config

This is to give you information about how to encrypt or then decrypt web.config particular section i.e. appSettings and connectionstrings. The reason to encrypt important web.config section(s) is the production environment. Following are the examples for encryption and decryption of web.config:- Encryption of the section: Before encryption: < runtime >     < assemblyBinding xmlns = " urn:schemas-microsoft-com:asm.v1 " appliesTo = " v2.0.50727 " >       < dependentAssembly >         < assemblyIdentity name = " System.Web.Extensions " publicKeyToken = " 31bf3856ad364e35 " />         < bindingRedirect oldVersion = " 1.0.0.0-1.1.0.0 " newVersion = " 3.5.0.0 " />       </ dependentAssembly >       < dependentAssembly >         < assemblyIdentity name = " System.Web.Extensions.Design " publicKeyToken = " 31bf3856ad364e35 " />