
September 17, 2008 19:19 by
今まで同じものだと思ってた。 ( WindowsIdentity と IPrincipal の違いは置いといて。)
それぞれ違うユーザー情報を返してきた時は驚いた。
・
WindowsIdentity クラス (System.Security.Principal) の
GetCurrent メソッド
現在実行中の Win32 スレッドのセキュリティ コンテキストの ID 情報を返します。
・
Thread クラス (System.Threading) の
CurrentPrincipal プロパティ
Win32 スレッドの上位で、現在実行されている .NET スレッドのプリンシパルを返します。
なるほど、型の違いと、Thread.CurrentPrincipal だけが設定可能なのはこういう理由か。
[ 参考 ]
ASP.NET ID マトリックス
.NET Framework のユーザー操作の基礎
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5