Tech Off Thread

4 posts

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

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.