Demystified Series: WinForms App Single Sign On in 2 Lines of Code!
- Posted: Jan 13, 2006 at 1:38 PM
- 23,026 Views
- 3 Comments
Download
How do I download the videos?
- To download, right click the file type you would like and pick “Save target as…” or “Save link as…”
Why should I download videos from Channel9?
- It's an easy way to save the videos you like locally.
- You can save the videos in order to watch them offline.
- If all you want is to hear the audio, you can download the MP3!
Which version should I choose?
- If you want to view the video on your PC, Xbox or Media Center, download the High Quality WMV file (this is the highest quality version we have available).
- If you'd like a lower bitrate version, to reduce the download time or cost, then choose the Medium Quality WMV file.
- If you have a Zune, WP7, iPhone, iPad, or iPod device, choose the low or medium MP4 file.
- If you just want to hear the audio of the video, choose the MP3 file.
Right click “Save as…”
- Mid Quality WMV (Lo-band, Mobile)
Welcome to the Demystified Series where we seek to identify and present the strategic and critical pieces of information that a developer needs to get up and running, and feel confident, in building identity-aware, directory-enabled applications.
Many developers are unaware of two information rich objects available to them for role-based validation and that can also be leveraged to verify authenticated access, essentially single sign on (SSO), to their application because the user has already logged onto the desktop. These are the WindowPrincipal and WindowsIdentity objects. The purpose of this screencast is to demystify how to leverage the rich information these objects provide – starting with just 2 lines of code.
Sample code for this screencast is available here:
- http://channel9.msdn.com/ShowPost.aspx?PostID=154871
For further information regarding Identity and Access Management, please visit:
- http://microsoft.com/ad
- http://microsoft.com/adam
- http://microsoft.com/miis
Comments Closed
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
What are you using behind the scenes? Is this basic AD? I am wondering how I would set this up.
Dear,
In Microsoft Visual Basic 2005 Express Edition, the line of code below
System.AppDomain.CurrentDomain.SetAppDomainPolicy(System.Security.Principal.PrincipalPolicy.WindowsPrincipal)
gives me the following error
Value of type 'System.Security.Principal.PrincipalPolicy' cannot be converted to 'System.Security.Policy.PolicyLevel'.
neilhut:
Thanks! The great thing about using the WindowsPrincipal and WindowsIdentity objects is that there is no set up required – yet these encapsulate information about Windows accounts whether the machine is domain attached or not. Therefore, simply pull in the appropriate namespace(s) and instantiate the objects required for either your single or repeated validation use. From there, if desired, the developer can interrogate the Name property to evaluate for a specific DOMAIN\ requirement for access to the application. The application could then be terminated with an error prompt based on the evaluation or possibly pop up another form to collect credentials for authentication to another identity store. Also, the Type property shows the type of authentication used to identify the user – Kerberos, NTLM, etc. There may be business reasons for the application to also make decisions based on this information.
guercheLE:
It appears that you need to adjust your syntax just a bit to:
AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal)
This should fix it.
Remove this comment
Remove this thread
close