Click here to Skip to main content
15,898,982 members
Home / Discussions / C#
   

C#

 
AnswerRe: Lenghty operations Pin
Chintan.Desai18-Jun-07 3:28
Chintan.Desai18-Jun-07 3:28 
Questionparsing string using Regular Expression Pin
Blumen18-Jun-07 0:55
Blumen18-Jun-07 0:55 
AnswerRe: parsing string using Regular Expression Pin
Ed.Poore18-Jun-07 1:08
Ed.Poore18-Jun-07 1:08 
GeneralRe: parsing string using Regular Expression Pin
Blumen18-Jun-07 1:19
Blumen18-Jun-07 1:19 
GeneralRe: parsing string using Regular Expression Pin
Ed.Poore18-Jun-07 1:46
Ed.Poore18-Jun-07 1:46 
GeneralRe: parsing string using Regular Expression Pin
Blumen18-Jun-07 1:56
Blumen18-Jun-07 1:56 
GeneralRe: parsing string using Regular Expression Pin
Ed.Poore18-Jun-07 2:59
Ed.Poore18-Jun-07 2:59 
QuestionWindowsIdentity and related classes Pin
hamidkhan18-Jun-07 0:49
hamidkhan18-Jun-07 0:49 
I'm using Windows 2000 Advanced Server SP4 and I have tried the code snippet below:

WindowsIdentity winid = WindowsIdentity.GetCurrent();
AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
WindowsPrincipal prin = (WindowsPrincipal)Thread.CurrentPrincipal;
MessageBox.Show(prin.IsInRole(Environment.MachineName + @"\" + "test").ToString());

My computer is not a domain controller and I dont have active directory installed. I created a group on my local machine named 'test' and added administrator to that group as a member and logged on to windows with administrator account. So the code above returns True and displays it. This is fine but when I remove administator from the group 'test' the code still shows True. This persists until I delete the group itself. Then the code displays 'False'. What do you think is the cause of this behavior?

I also have a problem retrieving a specific user's groups. I thought the IdentityReferenceCollection class would be useful and I used the code below:

IdentityReferenceCollection irc = winid.Groups;
foreach (IdentityReference var in irc)
{
MessageBox.Show(var.Value);
}

But this only displays some numbers that might have meaning to windows itself. but not a visual appearance of the groups on my local machine. such as a string conataining the groups' names. Any idea? Confused | :confused:
QuestionRe: WindowsIdentity and related classes Pin
hamidkhan27-Jun-07 0:43
hamidkhan27-Jun-07 0:43 
QuestionExporting SQL Server 2005 Reporting Services reports to PDF Pin
khuzwayom18-Jun-07 0:19
khuzwayom18-Jun-07 0:19 
QuestionChecking for a keypress in console. Pin
jblouir18-Jun-07 0:13
jblouir18-Jun-07 0:13 
AnswerRe: Checking for a keypress in console. Pin
Nissim Salomon18-Jun-07 0:49
Nissim Salomon18-Jun-07 0:49 
GeneralRe: Checking for a keypress in console. Pin
jblouir18-Jun-07 8:50
jblouir18-Jun-07 8:50 
GeneralRe: Checking for a keypress in console. Pin
jblouir18-Jun-07 8:54
jblouir18-Jun-07 8:54 
GeneralRe: Checking for a keypress in console. [modified] Pin
jblouir18-Jun-07 9:56
jblouir18-Jun-07 9:56 
GeneralThe answer. Pin
jblouir18-Jun-07 10:19
jblouir18-Jun-07 10:19 
QuestionClose (unlock), locked File on local machine! [modified] Pin
Martin#18-Jun-07 0:10
Martin#18-Jun-07 0:10 
QuestionAlter Access Query Pin
Muhammad Faisal Khanani17-Jun-07 23:44
Muhammad Faisal Khanani17-Jun-07 23:44 
AnswerRe: Alter Access Query Pin
Muammar©17-Jun-07 23:58
Muammar©17-Jun-07 23:58 
Questionget password field [modified] Pin
kathir_techconet17-Jun-07 23:37
kathir_techconet17-Jun-07 23:37 
AnswerRe: get password field Pin
Sathesh Sakthivel17-Jun-07 23:40
Sathesh Sakthivel17-Jun-07 23:40 
JokeRe: get password field Pin
Colin Angus Mackay17-Jun-07 23:43
Colin Angus Mackay17-Jun-07 23:43 
JokeRe: get password field Pin
Muammar©17-Jun-07 23:55
Muammar©17-Jun-07 23:55 
AnswerRe: get password field Pin
marky77718-Jun-07 0:16
marky77718-Jun-07 0:16 
QuestionHow to use notifyicon with contextmenustrip in Windows Services using .Net Framework 2.0 or 3.0 Pin
jmavn17-Jun-07 23:21
jmavn17-Jun-07 23:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.