Re: Using declaritive security on class members

From: Jason Kleban (jason.kleban_at_bdhhi.com)
Date: 07/21/03


Date: Mon, 21 Jul 2003 10:23:04 -0700


I just tried that on your recommendation and I get the
same rejection.

Request for Principal Permission Failed.

I tired it with and without the Name parameter, and
setting it to both "" and null

Jason

>-----Original Message-----
>Have you tried with Role = @"BUILTIN\Administrators" ?
>-mike
>MVP
>
>"Jason Kleban" <jason.kleban@bdhhi.com> wrote in message
>news:01ad01c34fa2$60e60750$a101280a@phx.gbl...
>> I'm trying to require that the user account calling
>> certain member functions belongs to an admin role.
>>
>> I've tried several variations on the following, but I
get
>> denied every time. I need something in the form of the
>> first, yet I tried others just to get any positive
results
>> (but got none). I can't say I've tried every combo, but
>> I'm thinking more is wrong with what I'm doing than just
>> the strings I'm giving it.
>>
>> [PrincipalPermissionAttribute(SecurityAction.Demand,
Role
>> = @"myDomain\Administrators")]
>> public void selfDestruct(){ ... }
>>
>> [PrincipalPermissionAttribute(SecurityAction.Demand,
Name
>> = "myUser")]
>>
>> [PrincipalPermissionAttribute(SecurityAction.Demand,
Name
>> = @"myDomain\myUser")]
>>
>> [PrincipalPermissionAttribute(SecurityAction.Demand,
Name
>> = @"myComputer\myUser")]
>>
>> [PrincipalPermissionAttribute(SecurityAction.Demand,
Name
>> = "", Role = "Administrators")]
>>
>> [PrincipalPermissionAttribute(SecurityAction.Demand,
Name
>> = null, Role = "Administrators")]
>>
>> [PrincipalPermissionAttribute(SecurityAction.Demand,
Name
>> = null, Role = @"myDomain\Administrators")]
>>
>> and so on.
>>
>> Any help?
>>
>> Thanks,
>>
>> Jason
>
>
>.
>



Relevant Pages

  • Re: Using declaritive security on class members
    ... To use Windows roles, the following piece of code must be executed somewhere in the beginning of your code: ... > I just tried that on your recommendation and I get the ... > same rejection. ... >>> Jason ...
    (microsoft.public.dotnet.security)
  • Re: WQMA
    ... He played a request before the show ... PS Don't forget to donate - looks like Jason and the guys need the cash ... I got out of the habit of listening to the FF back in the dim and distant days when I used to download the show from Wayne Ross' site. ... Besides which, the FF contains the same tracks too often (well, yes, I *know* they're the most popular tracks, that's why they're there, but you can end up chasing your tail that way). ...
    (rec.music.dementia)
  • Re: Using s///g to remove carriage returns
    ... Jason wrote: ... This is driving me nuts. ... The request is pretty simple: I have a form with a textarea field, ...
    (comp.lang.perl.misc)
  • Re: WQMA
    ... Alas, I had a hardware failure and my recording ended up dying ... He played a request before the show started, but I don't know what happened after the end of the main segment, 'cos I never listen to the Funny Five). ... PS Don't forget to donate - looks like Jason and the guys need the cash just now. ...
    (rec.music.dementia)
  • Re: Bipedalism in different substrates
    ... which I feel is a reasonable request. ... If Jason really wished ... > to ignore Algis, he wouldn't bother to reply at all. ... they pass under that quite low threshold, they just dont get in my killfile. ...
    (sci.anthropology.paleo)