Can't get a code group to work

Discussion in 'ASP .Net Security' started by Chris Cummings, Nov 3, 2003.

  1. I'm trying to use .Net Code Access Security. I've tried to
    create a code group at the user level (using strong name
    membership). Every time I run the app that is a member of
    the group, I get a SecurityException and never even get
    into Main(). This fails even if I set the PermissionSet of
    the group to Everything. The only time I can get the app
    to run is if I set the PermissionSet to Full Trust. Is
    there something I need to change in security.config or
    some Windows security setting I need to change?
     
    Chris Cummings, Nov 3, 2003
    #1
    1. Advertising

  2. OK, I found the reason. I have the code group flagged as
    exclusive (i.e. only use the permissions of this group at
    the user level). But I don't see why I can't mark it as
    exclusive. The documentation says that a security
    exception is thrown if the assembly is a member of more
    that one exclusive group which is not the case???
    >-----Original Message-----
    >I'm trying to use .Net Code Access Security. I've tried

    to
    >create a code group at the user level (using strong name
    >membership). Every time I run the app that is a member of
    >the group, I get a SecurityException and never even get
    >into Main(). This fails even if I set the PermissionSet

    of
    >the group to Everything. The only time I can get the app
    >to run is if I set the PermissionSet to Full Trust. Is
    >there something I need to change in security.config or
    >some Windows security setting I need to change?
    >.
    >
     
    Chris Cummings, Nov 3, 2003
    #2
    1. Advertising

  3. Actually turning of the exclusive attribute of the code
    group basically gives the assembly Full Trust from the
    AllCode group, so I'm back to square one.
    >-----Original Message-----
    >I'm trying to use .Net Code Access Security. I've tried

    to
    >create a code group at the user level (using strong name
    >membership). Every time I run the app that is a member of
    >the group, I get a SecurityException and never even get
    >into Main(). This fails even if I set the PermissionSet

    of
    >the group to Everything. The only time I can get the app
    >to run is if I set the PermissionSet to Full Trust. Is
    >there something I need to change in security.config or
    >some Windows security setting I need to change?
    >.
    >
     
    Chris Cummings, Nov 3, 2003
    #3
  4. OK, I found out why. The assembly needs to be marked as
    [assembly:AllowPartiallyTrustedCallers]
    >-----Original Message-----
    >I'm trying to use .Net Code Access Security. I've tried

    to
    >create a code group at the user level (using strong name
    >membership). Every time I run the app that is a member of
    >the group, I get a SecurityException and never even get
    >into Main(). This fails even if I set the PermissionSet

    of
    >the group to Everything. The only time I can get the app
    >to run is if I set the PermissionSet to Full Trust. Is
    >there something I need to change in security.config or
    >some Windows security setting I need to change?
    >.
    >
     
    Chris Cummings, Nov 3, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. craig dicker
    Replies:
    9
    Views:
    706
    Juan T. Llibre
    Jul 7, 2005
  2. Akaketwa
    Replies:
    1
    Views:
    5,068
    impaler
    Sep 22, 2006
  3. Replies:
    0
    Views:
    573
  4. Thomas
    Replies:
    7
    Views:
    284
    Bryan V
    Apr 17, 2006
  5. Xeno Campanoli
    Replies:
    1
    Views:
    365
    James Britt
    Jul 1, 2005
Loading...

Share This Page