Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CurrentPrincipal

0 views
Skip to first unread message

APA

unread,
Nov 15, 2009, 10:39:24 PM11/15/09
to
When is this castable to a WindowsPrincipal? I was working on some
sample code that looks like this:

System.Security.Principal.WindowsPrincipal principal =
(WindowsPrincipal)System.Threading.Thread.CurrentPrincipal;


However, this throws an exception on two different systems, one (running
Vista Ultimate) that is a member of a domain and I am logged in as a
domain user and one (running Windows 7) that is not a member of a domain.

Under what circumstances does this work?

Wilson, Phil

unread,
Nov 20, 2009, 12:42:17 PM11/20/09
to
Are you getting a security exception or a casting error? I'm wondering if
it's significant that both those OS versions are UAC.

--
Phil Wilson
The Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972


"APA" <bud...@excite.com> wrote in message
news:OqpWn5mZ...@TK2MSFTNGP05.phx.gbl...

0 new messages