dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] [bugs #10047] Default By default, System.Threading.Thr


From: Carl-Adam Brengesjö
Subject: [Pnet-developers] [bugs #10047] Default By default, System.Threading.Thread.CurrentPrincipal returns null.
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.8

This mail is an automated notification from the bugs tracker
 of the project: DotGNU Portable.NET.




/**************************************************************************/
[bugs #10047] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=10047>
Project: DotGNU Portable.NET
Submitted by: Carl-Adam Brengesjö
On: Wed 08/18/2004 at 00:13

Category:  None
Severity:  5 - Average
Item Group:  None
Resolution:  None
Assigned to:  None
Status:  Open


Summary:  Default By default, System.Threading.Thread.CurrentPrincipal returns 
null.

Original Submission:  test.cs:
----------------------------
using System;
using System.Threading;
using System.Security.Principal;

class Class
{
        [STAThread]
        public static void Main(String[] args)
        {
                Console.WriteLine(""{0}"", 
Thread.CurrentPrincipal.Identity.Name);
                Thread.CurrentPrincipal = new 
WindowsPrincipal(WindowsIdentity.GetCurrent());
                Console.WriteLine(""{0}"", 
Thread.CurrentPrincipal.Identity.Name);
        }
}



output (windows):
----------------------------
C:>test.exe
""
"HAMLETcarladam"


expected output (pnet):
----------------------------
address@hidden:/cygdrive/c$ ilrun test.exe
""
"carladam"


output (pnet):
----------------------------
address@hidden:/cygdrive/c$ ilrun test.exe
Uncaught exception: System.NullReferenceException: The value 'null' was found 
where an instance of an object was required
        at Class.Main(String[])


And Thread.CurrentPrincipal == null evulates to true on pnet, while on m$ it's 
false.












For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=10047>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]