Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Program design

Status
Not open for further replies.

tmcnutt

Programmer
May 17, 2002
83
0
0
US
I have created a program that creates a folder tree on a network drive and sets different permissions on the subfolders. The program works fine when I run it because I am using Administrator permissions, but someone with user permissions can't run it. The program is written in VB.Net 2003 with .Net framework 1.1. I used a command line script to set permissions because I couldn't find an object in .Net framework version to set permissions. I have read where .Net framework version 2 does have this capability, but I am not using it. What is the best way to go about creating a program where the program needs the proper permission to carry out the tasks, but the user running the program does not. I have already set to trust the assembly to take care of code security, but haven't found a way around user permissions. Should I have some type of client/server program where the user interface runs on the client and the server portions has the correct permission to carry out the creating and security tasks? All of the programs I have written run as a standalone on the client computer. Is there an way to give the program the proper permission without compromising security? Any help is greatly appreciated.

Thanks,
Tom
 
The easiest solution would be to use Impersonation (it's available in .Net 1.0 also). You'll have to feed it the credentials you want it to use via code, but it is designed to execute code with different permissions than what the current user has.

Another option would be like the one you described, where you have a service running on a machine that waits for instructions from the client app. I think it would be a fine idea, but it would add a chunk of complexity to the solution. I would try the impersonation angle first.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top