0

Hi I have a wpf application, developed using C# .net, and framework used is 4.5.

I was able to achieve Create, retrieve and delete operations related to the sql lite using EF6, and also was able to password secure the connection the sqlite db.

My problem is I want to secure the db file, I went through many links and googled for almost 3 days and came across various options, but few of them commercial and open ones are on C, nothing for .net.

So next approach was to keep file hidden for general user, as I dont want them to delete the file, as file is deleted then all the information in it will be lost. I am willing to understand,the best practices out there to secure sqlite database file (please note the database is secured with Key).

I tried below things

  • Storing the file on Appdata folder, but it is accessible and easy to remove the file, also someone can take the database file and try to bruteforce to know the password, which may not be worthy :)
  • Storing the file in program data folder, but if the use installed windows app is not admin, it may throw exception.
  • I came across IsolatedStorage, which seems to be hidden from general user, and also we can define the scope for the sotrage, but the problem is I am not able to implement if for .sqlite, as I do not know the exact path, and to initialize the sqlite connection, we require exact path.

What could be the best way to secure the file. I do not want user to read, update or delete using other application, but should be accessible only through my application.

Dreamweaver
  • 1,328
  • 11
  • 21

1 Answers1

0

(Just comment for this post) Sqlite database is normally can read and write from other user (Not from you app).For the problem of Open,Delete,Copy the sqlite db,I think you can lock the db file by Locking File(There are many type of locking file structure on google).So if you want to read data from your db,you unlock the db file with your specified key and open the connection.After that,you can lock the db file.

Jack
  • 13
  • 1
  • 5