If you want to find out if a user is a particular known group you can use... WindowsIdentity wi = WindowsIdentity.GetCurrent(); WindowsPrincipal wp = new WindowsPrincipal(wi); wp.IsInRole("Administrator"); //or whatever the role is. Getting a list of Groups a user is a member of is more difficult the last time I needed to do it I used the WinNT ADSI provider with the DirectoryServices classes... ----------------------------------------------------------------------- Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!! :-D
shaunAustin
Posts
-
How to get information of User? -
Disable write in comboBox C#Make it a Set the ComboBoxStyle property to DropDownList... that stops the text part from being an edit box! Shaun ----------------------------------------------------------------------- Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!! :-D
-
Choosing a domain name (UPDATE: Neck and Neck!)Paul I haven't read alll of the posts in this thread (no time) but www.paul-watson.com is available.... I personally find hyphenated names easier to look at... Shaun ----------------------------------------------------------------------- Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!! :-D
-
The art of not writing booksMichael P Butler wrote: SourceForge repository had beaten them to it :-D :laugh: :laugh: :laugh: :laugh: :-D Brilliant ----------------------------------------------------------------------- Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!! :-D
-
Anyone successfully order the VS 2005 beta?The MS shop site does that! I recently bought MSDN Universal and after handing over credit card details etc was amazed to see that the site was showing "You have no orders"... I DID get e-mail confirmation though... Shaun ----------------------------------------------------------------------- Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!! :-D
-
A conversation with BobB.A.M. - Bidirectional Associative Matrix?? ----------------------------------------------------------------------- Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!! :-D
-
This would freak me outNone of the cars appear to be turning though.... would be interesting to see how they handle that! ----------------------------------------------------------------------- Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!! :-D
-
outlook blocking some files automatically...On some versions of Outlook (pre XP) you could click on "forward" and the attachments would be there for you to save to disk in the little attachments field... they "Fixed" that on later versions I think... Definitely worth a try! ----------------------------------------------------------------------- Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!! :-D
-
New Nigerian Scam?I suppose one possibility is that they could be using a stolen credit card number! ----------------------------------------------------------------------- Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!! :-D
-
Instantiating a class of type x at runtimeThe way i tend to do it is to get the constructor (usually the parameterless one) and call invoke on it using reflection..
Type t = .... ConstructorInfo constructor = t.GetConstructor(System.Type.EmptyTypes); object newObject = constructor.Invoke(null);
----------------------------------------------------------------------- Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!! :-D -
Contract AdviceJudd wrote: this is the NHS and they don't have pots of money to go around You've GOT to be joking... you're talking about the UK NHS right???? The one that can't find __enough__ reasons to spend money on IT projects!!!!??!!?!?! As an NI payer I say go high! :-D ----------------------------------------------------------------------- Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!! :-D
-
Curious about www2 ?I've actually always thought it SHOULD be "ww"... Worldwide being one word and all.... ----------------------------------------------------------------------- Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!! :-D
-
This VC# bug is killing me - please help somebody!Not quite sure why that last comment deserved a "1" vote... it's just a statement of fact! ----------------------------------------------------------------------- Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!! :-D
-
This VC# bug is killing me - please help somebody!Doesn't matter anyway... I have a (large) solution with all binaries outputting to the correct folders and Copy Local set correctly etc etc and all the other conditions being correct I STILL get the error occasionally... ----------------------------------------------------------------------- Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!! :-D
-
Funny blog postThat's as old as the internet... (still funny though :-D) ----------------------------------------------------------------------- Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!! :-D
-
Adware??? on CP???Thank's for that... I was beginning to wonder if it was just me... (I'm reigning back in the paranoia as I type!!) :-D ----------------------------------------------------------------------- Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!! :-D
-
[Announce] Empower your Application Development (TD 4.0 coming soon)This guy has made 5 posts... ...every one scored a 1.0.... ...every one a spam! :| ----------------------------------------------------------------------- Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!! :-D
-
Adware??? on CP???That was my thoughts too... Thanks.. Shaun ----------------------------------------------------------------------- Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!! :-D
-
Adware??? on CP???:-DAgree completely... I recently did a bit of "servicing" of some PCs belonging to friends of my wife's. The worse offender was riddled with viruses and enough "free" utilities that the system tray area was almost half way across the screen (Win98)... ...the best bit though was that they had gone for 6 months clicking OK on a message box on bootup and eventually it just became part of the "starting the computer" routine... the message???... "[keyloggername].patch.reg could not be applied to the registry. The file may be corrupted or...." (can't remember exactly but you get the gist???.. Sat them down and had a ___Long___ chat! :-D ----------------------------------------------------------------------- Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!! :-D
-
Adware??? on CP???For your information I don't have anything on this machine other than VS.NET, Norton AV, ZoneAlarm and office! Certainly not Kazaa. Avenue.A from what I understand is fairly harmless and is an agency used by many large media-type sites (I can't go to a story on the Daily Telegraph's site without the thing popping up.) Maybe you should give people a bit more credit in future before jumping down their throats for making an innocent observation. :| ----------------------------------------------------------------------- Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!! :-D