locked
How to protect some files RRS feed

  • Question

  • Hello,

    I am developing a small application in C#, and I am looking to protect files so that they are not editable by users except for the application.
    I had thought of making a zip with password for the affected files, but could there not be some other more secure and optimal way to protect files?
    If so, which ones (with code examples please)?

    Thanks.
    Sunday, August 9, 2020 1:31 PM

All replies

  • The windows security model is based on user identity, not applications.

    Consider using encryption for application data so that security is tied to the application, not the identity of the user that is running it.

    Sunday, August 9, 2020 5:17 PM
  • Hi speed780,
    >>so that they are not editable by users except for the application.
    As RLWA32 said, the Windows security model is based on user identity, not application.
    The basic Microsoft Windows security model focuses on two areas: authentication and access control.
    In other words, the access control in Windows allows applications to selectively grant or deny certain users access to specific services.
    You can also use any access control list to grant or deny specific permissions to specific users or user groups.
    More details you can refer to this document.
    Best Regards,
    Daniel Zhang


    "Windows Forms General" forum will be migrating to a new home on Microsoft Q&A (Preview)!
    We invite you to post new questions in the "Windows Forms General" forum’s new home on Microsoft Q&A (Preview)!
    For more information, please refer to the sticky post.

    Monday, August 10, 2020 6:59 AM
  • Hi speed780,
    If the solution we provide solves your problem, please mark it as an answer.
    So it can help other people who have the same problem find a solution quickly.
    Thank you for your understanding.
    Best Regards,
    Daniel Zhang


    "Windows Forms General" forum will be migrating to a new home on Microsoft Q&A (Preview)!
    We invite you to post new questions in the "Windows Forms General" forum’s new home on Microsoft Q&A (Preview)!
    For more information, please refer to the sticky post.


    Friday, August 28, 2020 1:59 AM