Solved

SID to NTAccont translation

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

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…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

770 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