Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I am developing a winform application which is supposed to be offline.Meaning, it will store data on the local machine itself. The problem with this is that user can always just attach the file to any sql server management studio and alter procedures and stuff. Is it possible for me to specify a password for accessing the contents of that mdf file? If yes how? Thank you.
Posted

1 solution

You cannot prevent the access, but you CAN encrypt the data.

See here[^]

You should also write clearly in your license that any tampering with your database is violation of the license and voids any contract / support / rights of the user.
 
Share this answer
 
Comments
Arbaaz Jalil 13-Oct-14 3:01am    
Can we not just provide a password for the database? Like we do in connectionstring?
Sinisa Hajnal 13-Oct-14 3:15am    
Read the linked article. Admin can gain access to the file. You can make it harder by passwords, but you cannot make it impervious to determined admin. Read the article.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900