Results 1 to 5 of 5

Thread: Check for declared permissions

  1. #1

    Thread Starter
    Lively Member hbandarra's Avatar
    Join Date
    Aug 2002
    Location
    Lisbon, PT
    Posts
    66

    Check for declared permissions

    How do I check if I have permissions to execute a function whose permissions have been set declaratively without executing it?

    Thx!

  2. #2
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    ehs portugues? lol
    \m/\m/

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    If you know what permission it needs you can use
    System.Security.SecurityManager.IsGranted() to check whether you a specific permission.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  4. #4

    Thread Starter
    Lively Member hbandarra's Avatar
    Join Date
    Aug 2002
    Location
    Lisbon, PT
    Posts
    66
    Well, that's exactly what I need to know: What permissions the method needs to run or, how to test if I have permissions to execute the method without executing it.

    I've read in an article from msdnmag, (I think is this one

    http://msdn.microsoft.com/msdnmag/is...S/default.aspx

    where they say it's possible to know the permissions from the assembly file (dll), but I don't find where...

  5. #5

    Thread Starter
    Lively Member hbandarra's Avatar
    Join Date
    Aug 2002
    Location
    Lisbon, PT
    Posts
    66
    PT Exorcist: Sim, Lisboa!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width