Home All Groups Group Topic Archive Search About

How to ship read-only xml files

Author
11 May 2007 1:25 PM
Argirop
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?

Author
11 May 2007 2:08 PM
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>
Author
11 May 2007 4:00 PM
Argirop
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.

Show quote
"Michael Nemtsev" wrote:

> 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>
>
>
>
Author
11 May 2007 5:43 PM
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

--
Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

AddThis Social Bookmark Button