[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

Sharing a file between restricted users and user with administrative authorities

Marcus

9/3/2008 6:37:00 PM

Hi

I am trying to share files between restricted users and users with
administrative authorities. I want both users to be able to open the
files for both reading and writing.
I am running the application on Vista.
I have tried putting the files on the path:

Environment.GetFolderPath(System.Environment.SpecialFolder.CommonApplicationData));

This puts them in C:\ProgramData on Vista.

I have read this should be the place for file sharing. I do get
exception though when the restricted user tries to access a file.

I dont know how many hours I have put on this. I just cant seem to get
this file sharing to work.

ps.
This may be off topic. I could not find a really suitable place for
this question, sorry for this.
1 Answer

Pavel Minaev

9/4/2008 6:01:00 AM

0

"Marcus" <marcussilfver@gmail.com> wrote in message
news:5308189b-b050-4a95-ad29-25c1d53f1ae0@d45g2000hsc.googlegroups.com...
> I am trying to share files between restricted users and users with
> administrative authorities. I want both users to be able to open the
> files for both reading and writing.
> I am running the application on Vista.
> I have tried putting the files on the path:
>
> Environment.GetFolderPath(System.Environment.SpecialFolder.CommonApplicationData));
>
> This puts them in C:\ProgramData on Vista.
>
> I have read this should be the place for file sharing. I do get
> exception though when the restricted user tries to access a file.

As I recall from the Vista programming guidelines, the installer for your
program should create a folder for itself in ProgramData, and assign the
appropriate permissions to it (in your case - read/write to Everyone). It's
not writable by default, by design. You might find this utility handy for
that:

http://www.codeproject.com/KB/security/acl_common...