473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Machine.Config -- ProcessModel vs Identity Impersonation

What is the difference between using a username and password in the
processmodel section vs using one in impersonation in the machine.config
file? What are the advantages of each and what are the reasons for using
each?

Thanks for any replies,
Scott

Nov 18 '05 #1
3 6484
Scott,

If you set the processModel element, all threads that are executed by
ASP.NET will run under that context. If you set the <identity> element,
the main thread will run under the impersonated identity, but any new
threads you create will run under the identity specific in the
<processModel>. That is one difference that many developers don't realize.

You typically would not set the <identity> element in the machine.config.
Instead, it is most often set at the web.config level. It's important to
realize that you do not have to explicitly set a username and password for
the <identity> element. If you simply enable impersonation without
specifying a user, the identity will be that of the user who is
authenticated in IIS or the anonymous account if none is authorized.

In short, the <processModel> element is used to (among other things)
specify which weak account (preferably) will be used to run the worker
process. The <identity> element is used to specify that ASP.NET code
should be run as a user other than the process account.

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
ja******@online.microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.

--------------------
From: "Wm. Scott Miller" <Sc**********@spam.killer.wvinsurance.gov>
Subject: Machine.Config -- ProcessModel vs Identity Impersonation
Date: Mon, 24 May 2004 14:23:32 -0400
Lines: 10
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Message-ID: <#C**************@TK2MSFTNGP11.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: ip207064.pat.wvnet.edu 129.71.207.64
Path: cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP11
.phx.gblXref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet:235889
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

What is the difference between using a username and password in the
processmodel section vs using one in impersonation in the machine.config
file? What are the advantages of each and what are the reasons for using
each?

Thanks for any replies,
Scott


Nov 18 '05 #2
So, in the case of wanting to access a network share or database (integrated
security) which would be better or expose the least in security
vulnerabilities? Or in the case of the database and ASP.NET, is integrated
the way to go?

Thanks for the reply,
Scott

"Jim Cheshire [MSFT]" <ja******@online.microsoft.com> wrote in message
news:te*************@cpmsftngxa10.phx.gbl...
Scott,

If you set the processModel element, all threads that are executed by
ASP.NET will run under that context. If you set the <identity> element,
the main thread will run under the impersonated identity, but any new
threads you create will run under the identity specific in the
<processModel>. That is one difference that many developers don't realize.
You typically would not set the <identity> element in the machine.config.
Instead, it is most often set at the web.config level. It's important to
realize that you do not have to explicitly set a username and password for
the <identity> element. If you simply enable impersonation without
specifying a user, the identity will be that of the user who is
authenticated in IIS or the anonymous account if none is authorized.

In short, the <processModel> element is used to (among other things)
specify which weak account (preferably) will be used to run the worker
process. The <identity> element is used to specify that ASP.NET code
should be run as a user other than the process account.

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
ja******@online.microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.

--------------------
From: "Wm. Scott Miller" <Sc**********@spam.killer.wvinsurance.gov>
Subject: Machine.Config -- ProcessModel vs Identity Impersonation
Date: Mon, 24 May 2004 14:23:32 -0400
Lines: 10
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Message-ID: <#C**************@TK2MSFTNGP11.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: ip207064.pat.wvnet.edu 129.71.207.64
Path:

cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP11 phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet:235889X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

What is the difference between using a username and password in the
processmodel section vs using one in impersonation in the machine.config
file? What are the advantages of each and what are the reasons for using
each?

Thanks for any replies,
Scott

Nov 18 '05 #3
Hi Scott,

Sorry for the delay. I've been out of the office.

Integrated security is perfectly fine, but you must be aware of some of the
caveats involved. By default, integrated security is going to use NTLM,
and NTLM does not allow for delegation of credentials. In other words, if
your database server is on a different computer than IIS (and it should
be), NTLM security isn't going to work because in order to authenticate to
the database, your user's credentials have to be passed by IIS to the
database server on behalf of the user, and NTLM is designed to fail in that
scenario. Instead, you need to configure Kerberos authentication and
delegation.

810572 HOW TO: Configure an ASP.NET Application for a Delegation Scenario
http://support.microsoft.com/?id=810572

If you want to use integrated security, how you proceed depends upon how
you want the user to be authenticated. For example, if you just want to
make sure that a Windows account is used to access the database server, but
it doesn't necessarily have to be the user who is authenticated to the
site, you can simply impersonate the specific user account necessary in
code so that you can access the database.

306158 INFO: Implementing Impersonation in an ASP.NET Application
http://support.microsoft.com/?id=306158

If it is important to you that the user be the specific person browsing the
application, you can use the same article to impersonate the authenticated
user. Both of these ideas allow you to run under the context of a
priviledged account for the least amount of time required to get the job
done.

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
ja******@online.microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.

--------------------
From: "Wm. Scott Miller" <Sc**********@spam.killer.wvinsurance.gov>
References: <#C**************@TK2MSFTNGP11.phx.gbl> <te*************@cpmsftngxa10.phx.gbl>Subject: Re: Machine.Config -- ProcessModel vs Identity Impersonation
Date: Tue, 25 May 2004 12:07:25 -0400
Lines: 72
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Message-ID: <uF**************@TK2MSFTNGP11.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: ip207064.pat.wvnet.edu 129.71.207.64
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP11
.phx.gblXref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet:236136
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

So, in the case of wanting to access a network share or database (integratedsecurity) which would be better or expose the least in security
vulnerabilities? Or in the case of the database and ASP.NET, is integrated
the way to go?

Thanks for the reply,
Scott

"Jim Cheshire [MSFT]" <ja******@online.microsoft.com> wrote in message
news:te*************@cpmsftngxa10.phx.gbl...
Scott,

If you set the processModel element, all threads that are executed by
ASP.NET will run under that context. If you set the <identity> element,
the main thread will run under the impersonated identity, but any new
threads you create will run under the identity specific in the
<processModel>. That is one difference that many developers don't

realize.

You typically would not set the <identity> element in the machine.config.
Instead, it is most often set at the web.config level. It's important to
realize that you do not have to explicitly set a username and password for
the <identity> element. If you simply enable impersonation without
specifying a user, the identity will be that of the user who is
authenticated in IIS or the anonymous account if none is authorized.

In short, the <processModel> element is used to (among other things)
specify which weak account (preferably) will be used to run the worker
process. The <identity> element is used to specify that ASP.NET code
should be run as a user other than the process account.

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
ja******@online.microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.

--------------------
>From: "Wm. Scott Miller" <Sc**********@spam.killer.wvinsurance.gov>
>Subject: Machine.Config -- ProcessModel vs Identity Impersonation
>Date: Mon, 24 May 2004 14:23:32 -0400
>Lines: 10
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
>Message-ID: <#C**************@TK2MSFTNGP11.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>NNTP-Posting-Host: ip207064.pat.wvnet.edu 129.71.207.64
>Path:

cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSF TNGP08.phx.gbl!TK2MSFTNGP1

1
phx.gbl
>Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.aspnet:235889 >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>
>What is the difference between using a username and password in the
>processmodel section vs using one in impersonation in the machine.config
>file? What are the advantages of each and what are the reasons for using >each?
>
>Thanks for any replies,
>Scott
>
>
>
>



Nov 18 '05 #4

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

Similar topics

3
by: | last post by:
This question references to KB articles: http://support.microsoft.com/default.aspx?scid=kb;EN-US;315158 http://support.microsoft.com/default.aspx?scid=kb;EN-US;317012 I'm running Advanced Server...
11
by: Patrick | last post by:
I have an ASP.NET application that connects to a SQL Server database. The SQL Server resides on a seperate development server from the IIS5.1 on Windows XP SP2 on development PCs which host the...
2
by: Seth Darr | last post by:
OK I am at my wits end and I hope that someone can help me. I've got an ASP.NET web app that generates dynamic excel spreadsheets via COM. It does this work in a seperate subdirectory called...
27
by: Javier Martinez | last post by:
Hi I have asp application in a machine with a virtual directory referring a shared directory in another machine When I try to load any aspx page of my portal I get the following error: ...
10
by: Joe Befumo | last post by:
I'm trying to deploy a asp.net app that I developed in Visual Studio 2003 on an XP Professional machine. It runs fine on the development machine, but when I try to run it locally on the server...
0
by: omantawy | last post by:
Hi, I tried to override the Machine.config processModel idleTimeOut in my application web.config by doing the following: - Removing the from the Machine.config file. - Add the processModel...
3
by: wizofaus | last post by:
I've now created the same setup on four different machines, where I'm changing the processModel section machine.config so that ASP.NET (1.1) runs as SYSTEM, to give it permission to do various...
4
by: Saqib Ali | last post by:
I have some security concerns over storing a Active Directory username/ passwd in a text based web.config file for the identity impersonation definition. I know that web.conf is not accessible...
8
by: Brett | last post by:
I wrote an ASP.NET application that queries a SQL Server database (on a different box from the web server) and displays the result in a GridView. The datasource for the GridView is a SQLDataSource....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.