Monday 15 August 2011

c# - How to run application as another user from within an application -


I have a kind of awkward request - I have a lot of users who run my applications, and I The app needs to be aware that who knows it is not a problem at all, and I am capturing this information right.

The trick is to limit the application for sharing a network - none of the users running the app do not allow anything there, and there are so many things - reading, writing files , And because it is a WPF app, the data is binding to enter the URI in that limited area. For example, to set an image's image source, in all the different parts of the application, I need unrestricted access to that data.

I am looking into WindowsIdentity.Imersonation content, but it is more targeted to impersonate a user in a small context area. And then the cloning is ending .. which is fine, but not convenient.

Is there an app to start the app and then a user's impersonation within the app scope? Then I can do all the work with the right set set.

An approach that can work is to set up a Windows service on the user machine that has the appropriate Active Directory Account Can connect to the server with the privileges of. Your application will communicate directly with that Windows service to the server. Although it really works the way you want it, taking care of the mess you may involve more involved.

No comments:

Post a Comment