Most Active Hubs Microsoft Teams. Security, Compliance and Identity. Microsoft Edge Insider. Azure Databases. Autonomous Systems. Education Sector.
Microsoft Localization. Microsoft PnP. Healthcare and Life Sciences. Internet of Things IoT. Enabling Remote Work. Small and Medium Business. Humans of IT. Green Tech. MVP Award Program. Video Hub Azure. Microsoft Business. 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. Now we will create a web page and in the page load event we will fetch this connection string and write it as a response.
To start the process, you must open your command window with the admin privilege. Then type the following command. This command will narrate you to the framework version folder given. Now right click on your project and click open folder in file explorer and then copy the location. Now please go back to your command prompt and type the command as follows.
Please be noted that the text connectionStrings is case sensitive. So please be careful while you type the commands. Now I am going back to our application and see the config file. Shall we? You can see the connection string is encrypted as follows. You can always decrypt the connection string if you want, to decrypt you just need follows the commands as follows in the command prompt.
Now if you check your Web config again, you can see the connection string has got encrypted. Config file. Need Help? Our Support Team is here to help. Ask Question. Windows Forms. Config file used in Windows and Console Applications.
The Encryption and Decryption of the App. In this article I will provide a tutorial with example to encrypt and decrypt Connection String in App. The Plain Connection String in the App. The below screenshot shows the Plain Connection String in the App. Config file before encryption. Encrypting the Connection Strings in App. You need to follow the following steps for encrypting the Connection Strings in the App.
Renaming App. Config file to Web. Config files and hence we need to temporarily rename the App. Open Visual Studio Command Prompt. The same process will be applicable for the other versions. The only difference will be that you need to open Visual Studio Command Prompt from the folder of the respective version of Visual Studio installed on your machine. Encrypting the Connection String in App.
0コメント