Re: How to create password protected files thru C#
- From: "Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 11 Dec 2007 10:10:16 -0500
Ankit,
Not really. You can't set permissions on a file on an application
basis. Users and groups have rights which are used to resolve access to the
file.
Now, you can encrypt the file, and then make it so only your app has
access to the encryption key (for decrypting the file).
You could also create a shell extension for explorer in an unmanaged
language (you shouldn't create them in .NET) which would prevent other
programs from opening the file (I think), but honestly, I think that is the
wrong approach.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx
<aagarwal8@xxxxxxxxx> wrote in message
news:77cf93a5-1bec-43ef-ada3-5b39b0b8d24c@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I want to create a log file from my C# code. Currently I am encrypting
the contents of this log file, but now the requirement is that no one
should not be able to open this file from Windows Explorer. (Currently
if we open the file using some editor, the encrypted contents are
displayed)
The file should only be read/modified from within the program.
Is it possible to achieve this functionality in C#? Can i apply some
password to this file from within my program?
Any help in this regard is greatly appreciated.
Regards,
Ankit!!
.
- References:
- How to create password protected files thru C#
- From: aagarwal8
- How to create password protected files thru C#
- Prev by Date: Mouse Control Over WebBrowser
- Next by Date: Re: ListView SelectedIndexChanged and accessing the previous value
- Previous by thread: How to create password protected files thru C#
- Next by thread: Re: How to create password protected files thru C#
- Index(es):
Relevant Pages
|