Tech Off Thread

4 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Type.IsDefined required permissions

Back to Forum: Tech Off
  • User profile image
    TomasDeml

    Hi.

    I've created a sandboxed AppDomain with limited permissions and granted the full trust to my assembly. However, I'm not able to get a custom attribute applied on a type from another assembly (not fully trusted). The attribute type resides in my trusted assembly. I've done many assertions but I'm unable to determine what permissions Type.IsDefine method requires. The call does not return false only when the domain gets unlimited permissions. Even unlimited security & reflection permissions do not help.

    Can you help me? Thanks a lot.

  • User profile image
    TomasDeml

    I came accross this earlier but I didn't think it was exactly my case, but (unfortunately) applying APTCA solved my situation. I'm not so happy I have to use this attribute, but there is probably no other way...Sad

  • User profile image
    TomasDeml

    It's also really weird Type.IsDefined does not throw an exception and still doesn't work even when I'm able to execute code from that partially trusted assembly...

  • User profile image
    TomasDeml

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.