Solved

SID to NTAccont translation

Posted on 2007-03-22
1
496 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
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now