hi .net gurus

here is my question " how does impersonate in asp.net works?
explain with good example"

Answer Posted / karthika.s

At times users access a resource as though they were someone
else. This is known as impersonation.In ASP.NET, when
impersonation is turned off, the resources can be accessed
using a "local system process" account. When impersonation
is turned on, ASP.NET executes every resource using the
account of a specified user who is authenticated when the
user makes the request

It is easy to implement impersonation in ASP.Net. You can
use the Web.config file that is found in the root directory
of the application to enable or disable impersonation for a
particular application.

The application can also use the authenticated identity that
is received from the IIS if you enable impersonation. If you
are going to implement impersonation for an ASP.Net
application you can do so in three ways.

Just open up the web.config file, found in the root
directory of the application. By default impersonation is
disabled and you can find this with the line,

<identity impersonate="false" />

With the above settings the application worker process
account for the ASP.Net application is used. You can enable
impersonation by,

<identity impersonate="true" />

With this setting an authenticated user account or the
anonymous internet user account is used. If you want to
enable impersonation for a particular user account then you
have to use the following syntax.

<identity impersonate="true" userName="user_name"
password="user_password" />

By mentioning the user like this ASP.Net uses that account
specifically to run the application.

Is This Answer Correct ?    17 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is dynamic web page with example?

499


Explain the updatepanel?

557


What are web beacons used for?

520


What does asp in asp.net stand for?

499


Hi All, Im an MCA holder with 3+ years of experience in asp.net. Now i want to move to some good government job. I have no idea about different categories of exams held & which one can be applicable for my education background. I have done B.A with MCA. Please help me out with your valuable suggestions. I would be very grateful. Thanks Anuj

2823






What is the difference between asp.net and mvc?

567


How to reduce the width of textbox in editcommandcolumn of datagrid?

509


What is the difference between c# and .net?

563


What is a 401 redirect?

484


Is it right that ASP.NET Web API has replaced WCF?

479


1.can we add connection string in global.asax?????????? 2.what are the default files included when we create new web application????

18348


How to send a DataReader as a parameter to a remote client ?

2697


Explain the main function of url routing system in asp.net mvc? : asp.net mvc

476


Explain the code Access Security (CAS) in .net Framework?

643


How many validators do ASP.NET have?

586