?
Solved

ASP.Net - Impersonation - Solid Example?

Posted on 2011-10-06
2
Medium Priority
?
273 Views
Last Modified: 2012-05-12
Hello all,

I am trying to really understand impersonation from the aspect of when would it be useful and a easy way to understand it.  I know I have had to enable it in certain error cases and I know when you enable it you are relying on IIS to use the client authentication VS the ASPNET account.  I am just trying to wrap my head around in what cases would you use it as it is disabled by default.
0
Comment
Question by:sbornstein2
2 Comments
 
LVL 18

Accepted Solution

by:
ivan_vagunin earned 500 total points
ID: 36926370
Hi!
Impersonation is used when you need to executed in context of user who requested or posted the page. For example consider you want to read files from folder on server and folder has read permissions only for User1. If you will not use impersonation, then code will be executed in context of ASP.net user, which does not has permissions and operation will fail. But if you use impersonation and login as User1 then code will be executed in context of User1 and operation will succeed.
0
 

Author Closing Comment

by:sbornstein2
ID: 36927240
perfect example, thanks
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month15 days, 14 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question