Click here to Skip to main content
15,910,303 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to get the window coordinates Pin
SherKar2-Mar-04 7:43
SherKar2-Mar-04 7:43 
GeneralRe: how to get the window coordinates Pin
Heath Stewart2-Mar-04 8:52
protectorHeath Stewart2-Mar-04 8:52 
GeneralSnagging in memory assemblies Pin
RB@Emphasys1-Mar-04 7:27
RB@Emphasys1-Mar-04 7:27 
GeneralRe: Snagging in memory assemblies Pin
Heath Stewart1-Mar-04 9:10
protectorHeath Stewart1-Mar-04 9:10 
GeneralRe: Snagging in memory assemblies Pin
RB@Emphasys1-Mar-04 10:33
RB@Emphasys1-Mar-04 10:33 
QuestionAPI Viewer for C#? Pin
Alexsander Antunes1-Mar-04 7:24
professionalAlexsander Antunes1-Mar-04 7:24 
AnswerRe: API Viewer for C#? Pin
Nick Parker1-Mar-04 8:24
protectorNick Parker1-Mar-04 8:24 
GeneralPrincipal Permissions Pin
Mauricio Ritter1-Mar-04 2:45
Mauricio Ritter1-Mar-04 2:45 
I'm trying to protect one of my classes using PrincipalPermissionAttribute. I'm setting it to only allow the code to execute only if a specific user is trying to run it.
Here is the class declaration:
[PrincipalPermissionAttribute(SecurityAction.Demand, Authenticated:=True, name:="MYDOMAIN\\Mauricio")] public class foo

This code works fine but the problem is that it allows the usage of an GenericPrincipal object and I want it to use a WindowsPrincipal object. Allow it to use a GenericPrincipal will anyone to create a GenericPrincipal with that user name and execute the code. Like this:

GenericIdentity oIdent = new GenericIdentity("MYDOMAIN\\Mauricio", "NTLM");
GenericPrincipal oPrinc = new GenericPrincipal(oPrinc, null);

foo oFoo = new foo();

My question is: is there anyone to demand that a code only accepts WindowsPrincipals, and don't accept GenericPrincipals ? WTF | :WTF:

thanks




Mauricio Ritter - Brazil
Sonorking now: 100.13560 MRitter


English is not my native language so, if you find any spelling erros in my posts, please let me know.
GeneralRe: Principal Permissions Pin
Heath Stewart1-Mar-04 4:05
protectorHeath Stewart1-Mar-04 4:05 
GeneralDocking panel pushes another... Pin
Weiye Chen1-Mar-04 2:28
Weiye Chen1-Mar-04 2:28 
GeneralRe: Docking panel pushes another... Pin
Heath Stewart1-Mar-04 3:57
protectorHeath Stewart1-Mar-04 3:57 
GeneralRe: Docking panel pushes another... Pin
Weiye Chen1-Mar-04 4:12
Weiye Chen1-Mar-04 4:12 
GeneralRe: Docking panel pushes another... Pin
Heath Stewart1-Mar-04 4:18
protectorHeath Stewart1-Mar-04 4:18 
GeneralRe: Docking panel pushes another... Pin
Weiye Chen1-Mar-04 4:57
Weiye Chen1-Mar-04 4:57 
GeneralDrawing image from a control Pin
mhmoud rawas1-Mar-04 0:56
mhmoud rawas1-Mar-04 0:56 
GeneralRe: Drawing image from a control Pin
Weiye Chen1-Mar-04 1:47
Weiye Chen1-Mar-04 1:47 
GeneralRe: Drawing image from a control Pin
mhmoud rawas1-Mar-04 21:33
mhmoud rawas1-Mar-04 21:33 
GeneralRe: Drawing image from a control Pin
Heath Stewart1-Mar-04 3:54
protectorHeath Stewart1-Mar-04 3:54 
GeneralRe: Drawing image from a control Pin
mhmoud rawas1-Mar-04 21:32
mhmoud rawas1-Mar-04 21:32 
GeneralRe: Drawing image from a control Pin
Heath Stewart2-Mar-04 1:20
protectorHeath Stewart2-Mar-04 1:20 
GeneralRe: Drawing image from a control Pin
mhmoud rawas2-Mar-04 17:32
mhmoud rawas2-Mar-04 17:32 
Generalunresolved token Pin
mohammadQ29-Feb-04 23:52
mohammadQ29-Feb-04 23:52 
GeneralRe: unresolved token Pin
Heath Stewart1-Mar-04 3:52
protectorHeath Stewart1-Mar-04 3:52 
GeneralHooking Keyboard Pin
aliarifpk29-Feb-04 23:13
aliarifpk29-Feb-04 23:13 
GeneralRe: Hooking Keyboard Pin
Mazdak29-Feb-04 23:23
Mazdak29-Feb-04 23:23 

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.