none
CAS code access security

    Question

  • How can I limit access to only text files with CAS? Using path wildcards doesn't work, for example:

    ViewAndModify="*.txt"

     

    Thank you.

    Thursday, March 29, 2007 9:28 PM

Answers

  • By checking the following code logic got from .Net Reflector, I believe it does not allow “*" .


      static FileIOPermission( )

     {

        m_illegalCharacters = new char[] { '?', '*' };

     }


    So it does not support wildcard. I think it impossible to limit access to only text files with CAS.

    Friday, March 30, 2007 4:46 AM