RE: confused about credentials in impersonation
From: Daniel Larson (www.portalbuilder.org) (daniel_at_larsontechnology.spamfree.com)
Date: 02/04/05
- Next message: Daniel Larson (www.portalbuilder.org): "RE: HOWTO: Disable/Enable Sharepoint Portal Server Services"
- Previous message: Ted: "Re: How to setup a SPS on Server 2003"
- In reply to: silentsoldier: "confused about credentials in impersonation"
- Next in thread: silentsoldier: "RE: confused about credentials in impersonation"
- Reply: silentsoldier: "RE: confused about credentials in impersonation"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 4 Feb 2005 11:25:04 -0800
Don't modify the web.config impersonation tag... leave it on impersonate=true
unless you REALLY have a reason.
If you want to make a call (to a database, webservice, whatever) as the
application pool identity you can drop the impersonation like this:
WindowsImpersonationContext wic =
WindowsIdentity.Impersonate(IntPtr.Zero);
try
{
// do a call under the app pool identity here...
}
finally
{
wic.Undo();
}
Using this approach you can impersonate the user and make db calls under a
known user and use Windows Authentication on your SQL Server or whatever
else, restricting access to the application's identity rather than the user's
identity.
Daniel Larson
http://www.portalbuilder.org
"silentsoldier" wrote:
> what kind of credential are passed for impersonating an account i am confused
> about credentials ie whose user name password and domain is required client's
> account or server's accounts or server's administration account or domain
> account can some one guide abt this issue
- Next message: Daniel Larson (www.portalbuilder.org): "RE: HOWTO: Disable/Enable Sharepoint Portal Server Services"
- Previous message: Ted: "Re: How to setup a SPS on Server 2003"
- In reply to: silentsoldier: "confused about credentials in impersonation"
- Next in thread: silentsoldier: "RE: confused about credentials in impersonation"
- Reply: silentsoldier: "RE: confused about credentials in impersonation"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|