?
Solved

SID to NTAccont translation

Posted on 2007-03-22
1
Medium Priority
?
519 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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

777 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