Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

windows.forms NTauthentication (not user.identity)

In applications, I can simply use User.Identity.Name to retrieve the NT Account (domain/account) of the user.

Now, how do I do this in a windows.forms (desktop) application? For the life of me I can't find where the NT Account info is stored.

Thanks for the help,

Friday, March 04, 2005

It is in the
System.Security.Principal.WindowsIdentity object.

Use the GetCurrent method.  The domain\userid are stored in the Name property.

Friday, March 04, 2005

Works Perfectly. Thanks.

Friday, March 04, 2005

*  Recent Topics

*  Fog Creek Home