Click here to Skip to main content
15,891,644 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Good day guys! I have a form on my application that allows the user to add connection to the database. I am writing the connection string on an XML file, my question is how can I add a restriction to the XML file to prevent editing and deletion of the file? I was thinking if it is possible to add security on the file itself using codes in vb.net? Although the content of the XML file is encrypted, yet I want to add additional security features to avoid deletion/editing of the file. I hope someone can help me with this. Thanks in advance guys.
Posted

1 solution

You can't. No matter what, if it's a file, I can delete it. You could store a default inside your app, and replace it if it's deleted, but you can't stop people deleting it or editing it. If you don't want it edited, why is it stored outside the app at all ?
 
Share this answer
 

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