Solved

SID to NTAccont translation

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

860 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