identity impersonate - in a windows app?

  • Thread starter Thread starter Rich K
  • Start date Start date
R

Rich K

Hi,

How can I perform the equivalent of a Web Applications

<identity impersonate="true" />

in a windows application?

Thanks,
Rich.
 
Rich said:
Hi,

How can I perform the equivalent of a Web Applications

<identity impersonate="true" />

in a windows application?

Thanks,
Rich.

Simply add the following to before you call Application.Run:

// set authentication policy
AppDomain.CurrentDomain.SetPrincipalPolicy (
System.Security.Principal.PrincipalPolicy.WindowsPrincipal );

The next time you perform anything related to the principal, it will use
the user's who started the application.

-Lenard
 
Lenard Gunda said:
Simply add the following to before you call Application.Run:

// set authentication policy
AppDomain.CurrentDomain.SetPrincipalPolicy (
System.Security.Principal.PrincipalPolicy.WindowsPrincipal );

The next time you perform anything related to the principal, it will use
the user's who started the application.

-Lenard

Thank you very much!
 
Back
Top