473,549 Members | 2,784 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6496
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**********@s pam.killer.wvin surance.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.publi c.dotnet.framew ork.aspnet
NNTP-Posting-Host: ip207064.pat.wv net.edu 129.71.207.64
Path: cpmsftngxa10.ph x.gbl!TK2MSFTFE ED01.phx.gbl!TK 2MSFTNGP08.phx. gbl!TK2MSFTNGP1 1
.phx.gblXref: cpmsftngxa10.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:2358 89
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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******@onlin e.microsoft.com > wrote in message
news:te******** *****@cpmsftngx a10.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**********@s pam.killer.wvin surance.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.publi c.dotnet.framew ork.aspnet
NNTP-Posting-Host: ip207064.pat.wv net.edu 129.71.207.64
Path:

cpmsftngxa10.ph x.gbl!TK2MSFTFE ED01.phx.gbl!TK 2MSFTNGP08.phx. gbl!TK2MSFTNGP1 1 phx.gbl
Xref: cpmsftngxa10.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:2358 89X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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**********@s pam.killer.wvin surance.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.publi c.dotnet.framew ork.aspnet
NNTP-Posting-Host: ip207064.pat.wv net.edu 129.71.207.64
Path: cpmsftngxa10.ph x.gbl!TK2MSFTNG XA01.phx.gbl!TK 2MSFTNGP08.phx. gbl!TK2MSFTNGP1 1
.phx.gblXref: cpmsftngxa10.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:2361 36
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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
vulnerabilitie s? 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******@onlin e.microsoft.com > wrote in message
news:te******* ******@cpmsftng xa10.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**********@s pam.killer.wvin surance.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.publi c.dotnet.framew ork.aspnet
>NNTP-Posting-Host: ip207064.pat.wv net.edu 129.71.207.64
>Path:

cpmsftngxa10.p hx.gbl!TK2MSFTF EED01.phx.gbl!T K2MSFTNGP08.phx .gbl!TK2MSFTNGP 1

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

microsoft.publ ic.dotnet.frame work.aspnet:235 889 >X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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
5352
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 2000 as a domain controller with IIS 5 (I know I shouldn't be doing this - just a test machine). I am using the default ASP.NET (v1.1)...
11
2370
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 ASP.NET application. I would like to use Integrated Windows Authentication like Integrated Security=SSPI;Persist Security Info=False;Initial...
2
1795
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 "reports" and uses impersonation of the ReportWriter account in its own Web.config file in that directory. ReportWriter is an account on the machine...
27
2531
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: Mensaje de error del analizador: We can't load the type 'JULIAN.Global'.
10
1187
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 (i.e., http://myserver/myappdir.) I get an error like this: Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET...
0
1639
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 section to my application web.config as follows: <processModel idleTimeout="0:20:00" /> - There is a processModel section in the machine.config file...
3
6022
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 things like access the Task Scheduler etc. Three of the machines are using IIS 5.1 and work fine. The 4th machine is using IIS 6.0, and also has...
4
10782
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 via the web browser, however someone with account on the server can get to the file and steal the credentials. Is there a way to hash the...
8
6323
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. Just to get it to work, I hard-coded the username and password of a SQL Server account in the connectionstring in web.config. Once I confirmed...
0
7715
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. ...
0
7956
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...
1
7469
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...
0
7808
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5368
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...
0
5087
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...
0
3480
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1057
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
757
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.