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
Explain asp.net page life cycle?
Can we make activex dll also ti execute in some process as that of client ? How can we do?
What is owin authentication?
Explain the difference between dataset and datareader.
What is custom events? How to create it?
What are the different properties of server control that exists?
What's the difference between viewstate and sessionstate?
What is the difference between equals() and == in c#?
Is there any alternative to avoid name collisions other then Namespaces?
How can we create a website?
Explain what does mvc represent in asp.net? : asp.net mvc
What are validators and list some validators of asp.net?
Describe the sequence of action takes place on the server when ASP.NET application starts first time?
What is the recommended approach for asp.net mvc to globally intercept exceptions? What other functionality can be implemented with the approach? : Asp.Net MVC
Take a Large textbox allow to type any data. Task 1:display the count of vowels in a lable on key press event of the textbox Task 2:dispaly count of dates in a lable when dates in following foramats:dd/mm/yy , mm/dd/yy , yy/mm/dd. Task3:compare 2 dates and display both are same or not which dates are in dd/mm/yy and mm/dd/yy farmats.