简体   繁体   中英

Saving to SQL Server database from WPF

I have a SQL Server database hosted on Azure. I need to write data from multiple PC users that are using WPF app to this database.

Assuming that WPF app is used by multiple users is it safe to save connection string in app.config file? What are the best practices for saving data from a Windows app into a shared database?

I'm afraid that users can manipulate data by utilizing connection string stored in app.config .

Assuming that WPF app is used by multiple users is it safe to save connection string in app.config file?

IMHO, it is never safe to store connection string in plain text. You're absolutely correct that users can connect to the database outside of your application and cause some serious damage to your database.

A few things that come to my mind are:

You may also find the following article useful in securing your Azure SQL Database: https://azure.microsoft.com/en-us/documentation/articles/sql-database-security-guidelines/ .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM