Solved

SID to NTAccont translation

Posted on 2007-03-22
1
505 Views
Last Modified: 2008-02-26
I have the following code, trying to translate a SID id into an actual NTAccount (groups).  But I get the following error trying to compile:  "Error      2      'System.Security.Principal.NTAccount' is a 'type', which is not valid in the given context      C:\Documents and Settings\jongewb\My Documents\Visual Studio 2005\Projects\SkyPayWinApp\SkyPayWinApp\User.cs      30      86      SkyPayWinApp"


IdentityReference irAccount = ir.Translate(System.Security.Principal.NTAccount)

Am I using the above wrong?
0
Comment
Question by:benjongewaard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 41

Accepted Solution

by:
graye earned 500 total points
ID: 18782955
... just add "typeof"

IdentityReference irAccount = ir.Translate(typeof(System.Security.Principal.NTAccount));

Here is a pretty good article that might be of some help  http://www.pluralsight.com/wiki/default.aspx/Keith.GuideBook/HowToProgramWithSIDs.html
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question