How to ship read-only xml files

G

Guest

I need to include some xml files with my windows form application. These
files are user as read-only by the application. Furthermore the user should
not be able to modify them (idealy should be hidden for him/her).

What is the best method to do this?
 
M

Michael Nemtsev

Hello Argirop,

Hmmm, set the hidden flag, and put to the application folder.
but nothing prevent to find your file and change it.

You can encrypt your file, so the content was not clear for the user

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

A> I need to include some xml files with my windows form application.
A> These files are user as read-only by the application. Furthermore the
A> user should not be able to modify them (idealy should be hidden for
A> him/her).
A>
A> What is the best method to do this?
A>
 
G

Guest

Michael,

Thanks for your reply. However I had already in mind a more sophisticated
idea, adding the files in a resource file, though include them in the
assemply. But still I am simply wandering what is the "recommended practice"
for such cases that I believe are quite common.
 
M

Mattias Sjögren

Thanks for your reply. However I had already in mind a more sophisticated
idea, adding the files in a resource file, though include them in the
assemply. But still I am simply wandering what is the "recommended practice"
for such cases that I believe are quite common.

Adding it as an embedded resource is certainly one option. Another is
to rely on file system ACLs.


Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top