I have a serviced component, and I want it to be able to do some stuff
on behalf of the client using impersonation. However, no matter what I
do, the Impersonation level of the SecurityIdentity in the
SecurityCallContext is always "Anonymous".
I have set up the component with Server activation, and access control
for both application and components. The ImpersonationLevelOption is
set to Delegate. I've tried running the COM+ application in several
different user user contexts, including myself and the system
administrator, but it is always the same.
Does anyone know what is required to make the context allow
impersonation?
E.g. when I do:
SecurityIdentity id = SecurityCallContext.CurrentCall.DirectCaller;
or
SecurityIdentity id = SecurityCallContext.CurrentCall.OriginalCaller;
I get the properties:
id.ImpersonationLevel = Anonymous
id.AccountName = MYDOMAIN\myname
id.AuthenticationService = 10
id.AuthenticationLevel = Privacy
I want, of course, the Impersonation level to be "Impersonate" or
"Delegate".
I'm accessing the component by using Activator, like this:
Type t = Type.GetTypeFromCLSID( myComponentGuid, serverName );
IMyComponent myComponent = (IMyComponent) Activator.CreateInstance( t
);
Any help would be greatly appreciated.
Brad - 10 Dec 2003 21:57 GMT
Erik,
Please review the following article & let me know if you have any questions:
283201 HOWTO: Use Delegation in Windows 2000 with COM+
http://support.microsoft.com/?id=283201
- Brad