473,748 Members | 7,142 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What is the Use of <Identity Impersonate="tr ue">

Hi,
What is the use of <Identity Impersonate="tr ue" />
How can we implement this in an ASP.NET application
When are we supposed to use this.
please provide me the details with an Example.
Raghuram
Nov 19 '05 #1
3 5904
Hi!

You can make your application run under another account than ASPNET. I.E.
you need access to the filesystem somewhere ASPNET doesn't have access. To
do this, you can insert the <identity> element in web.config like this:
<configuratio n>
<system.web>
<!-- anywhere you'd like inside system.web -->
<identity impersonate="tr ue" userName="xx" password="xx"/>

If you're gonna use this on a production server, I recommend reading the
following article. It explains how you can move the user/pass values to the
registry instead of having them in clear text in web.config.
http://support.microsoft.com/default...b;en-us;329290

HTH,
Lars-Erik

"Raghuram" <rv******@gmail .com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hi,
What is the use of <Identity Impersonate="tr ue" />
How can we implement this in an ASP.NET application
When are we supposed to use this.
please provide me the details with an Example.
Raghuram

Nov 19 '05 #2
As Lars-Erik says, you can have the requests executing with a
different identity. Without a username and password in the element the
request will execute with the identity of the client, and you can
access resources on the server that the ASPNET / NETWORK SERVICE
accounts cannot get to.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Mon, 18 Apr 2005 15:07:20 +0530, "Raghuram" <rv******@gmail .com>
wrote:
Hi,
What is the use of <Identity Impersonate="tr ue" />
How can we implement this in an ASP.NET application
When are we supposed to use this.
please provide me the details with an Example.
Raghuram


--
Scott
http://www.OdeToCode.com/blogs/scott/
Nov 19 '05 #3
The other situation where you'd use this (in addition to the other replies)
is if your code needs to access a resource have you need to authenticate
as the user that's using your application. So every request would do security
checks with the credentials of the user making that request (as opposed to
a dedicated account when you specify a username/password). This requires
you to be using windows authentication.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi,
What is the use of <Identity Impersonate="tr ue" />
How can we implement this in an ASP.NET application
When are we supposed to use this.
please provide me the details with an Example.
Raghuram


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2341
by: Arvid Andersson | last post by:
Hello, I need to convert a string to a number, but the string can contain +,-,* and / as well as parenthesis. For example, if I have the string "30/(6+9)" I would like a function that returned the number 2. I actually wrote a java function that did this a couple of years ago, in school, as an excersise in "binary trees". I lost it, and most of my programming knowledge, but I figured perhaps there is a way to do this easily in python? It...
1
1816
by: Anton ml. Vaheie | last post by:
How do I convince (what I have to set in asp.net server) that my program that is using <authentication mode="Forms" /> can write to, copy, etc. files in directories on local disk? I have given full permisions to local directory (IUSR_Machinename user), but I still get: "System.UnauthorizedAccessException: Access to the path "D:\Inetpub\wwwroot\". Any idea how to change it?
2
2121
by: joeted | last post by:
Hello, I am trying to run a batch file on a (remote) .NET server (i'm not the admin) using system.diagnostics.process I find that the batch file is successfully executed. However, when i put <identity impersonate="true"/> in my web.config i get an "access denied" exception.
2
7277
by: franzhe | last post by:
Hi all, in a simple ASP.Net application with resources in satellite assemblies I have the following problem: If I set <identity impersonate="true"/>, accessing a culture specific resource from a satellite assembly fails with the error message: "Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly. ..."
6
3136
by: Meena Desai | last post by:
Hi, What are the effects of using <identity impersonate="true"/> in web.config on windows auhtentication? Does it affect windows security? Thanx in advance, Meena.
18
4767
by: =?Utf-8?B?VG9t?= | last post by:
is it possible to add a bunch of users to group and only allow group to access the web page or do I need to add each user to the web.config file? Or is there another way to do this? I just took over a project and most of the web sites have users defined in the web.config file that can access the site. Now users come and go so this config file is always being modified. Could I just add the users to a group and only allow that group, or...
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9541
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9370
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4602
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3312
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.