Fog Creek Software
g
Discussion Board




Welcome! and rules

Joel on Software

windows.forms NTauthentication (not user.identity)

In asp.net 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,
Roger

Roger
Friday, March 4, 2005

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

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

bw
Friday, March 4, 2005

Works Perfectly. Thanks.

Roger
Friday, March 4, 2005

*  Recent Topics

*  Fog Creek Home