Please Sign up or sign in to vote. Introduction Sensitive information should not be kept as clear text. How to protect To protect the information mentioned in config files, we need to encrypt the config file sections. The following command can be used to encrypt the specific sections of the web.
Copy Code. First Prev Next Please upload sample project mymmb May Tony Selke Sep Patel Nov Thanks and regards, Pratik Patel Sr. Pune, India. Go to top. Layout: fixed fluid. For a project I was working I basically scripted the following approach:. Chances are if you are just encrypting connection strings then this won't be a problem. You also need to be bear in mind whether you want to encrypt on a machine wide basis or to a specific user account- both options can be useful depending on your scenario.
For simplicity I stuck to machine wide encryption. The links I have provided explain the merits of both approaches. NET 2. You can also encrypt and decrypt sections in the Web. How are we doing? Please help us improve Stack Overflow. Take our short survey. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Encrypting Web. Config Ask Question. Asked 12 years, 6 months ago. Active 2 years, 10 months ago. Viewed 52k times. On the server you can use cmd. As I said, the RSA provider by default relys on keys that can be shared among several machines, however this is not the default behavior so I can not share a file encrypted on machine A with the machine B. I will receive an error as follows:. It must be secured.
Here I am going to show you a demo of how we can do that. Net 5 project, or any kind of templates you works with. I hope you will like this. I used to secure my config file if I am the who starts the project. Here you will get to know how easy the procedure is to encrypt the connection string.
There is only a few steps to be followed. I will explain those. Hope you get a solution as follows. Now We will connect to a database. Now it is time to add our connection string, hope you got your data source of the database we already connected. The connection string property must be placed under configuration tag in your web config file. Here is mine.
0コメント