Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Security / July 2005

Tip: Looking for answers? Try searching our database.

Impersonation Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
clsmith66 - 08 Jul 2005 18:34 GMT
I am building an application in C# that uses the MODI COM object to OCR a
series of scanned images in a specific folder.  I have been requested to make
the application impersonate a specific user when it attempts to access the
folder and the files within.  I have had some limited sucess calling some
impersonation code I have found in a tutorial (I'm still fairly new at
development, so I'm trying to work through a few bugs).  What I would like to
know is if I can make the entire application use impersonation from start to
end?  Right now I have to start the impersonation every time I want to access
the folder and then end it when I'm done.  Any help on how I could set this
up (if it is possible) would be greatly appreciated.

Chris
Nicole Calinoiu - 10 Jul 2005 15:28 GMT
>I am building an application in C# that uses the MODI COM object to OCR a
> series of scanned images in a specific folder.  I have been requested to
[quoted text clipped - 11 lines]
> this
> up (if it is possible) would be greatly appreciated.

It's possible, but it's not necessarily a great idea since the privileged
granted to that account may not be appropriate while performing other
actions.  However, if the entire application is intended to run as a given
user, why not launch it as that user?  If only the processing of the files
should run under that user account, why not extract the file handling into a
separate application that might run under that account context as, say, a
COM+ server?

> Chris
Manuel Conde - 22 Jul 2005 23:44 GMT
Hello,
I am very happy by finding your question, because I'm looking for something
like this.
I am still novice in security and impersonation, and I hope you can help me.
I'm developing and application that runs under the privileges of an user,
but in certain stage, the application must read a file that only other user
have access to it.
I would want to know if I can switch to this account to have access to the
file.
Example:
Application runs under user account 1.
Application switchs to user account 2.
Application accesses to the files of the user account 2.
Application returns to the user account 1.

It's this possible?
Some code lines would be very appreciated.
A lot of thanks!!!!
Manolo

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.