Re: CodeAccessSecurityAttribute and named parameters of type System.Type



The problem is certainly trivial to reproduce, but I can't recall ever
hearing of the limitation before, and I can't find anything about it in the
docs. Your best bet might be to report the problem at
http://lab.msdn.microsoft.com/productfeedback/default.aspx, where there's a
reasonably good chance that someone from the relevant product team will take
a look at it.



"Willem van Rumpt" <no.slide.spam@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:u5AeHNadGHA.1656@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

I'm working on the authorization subproject of our framework, and defined
a class that derived from CodeAccessSecurityAttribute. One of its named
parameters is of type System.Type (actually, it should've been a required
constructor parameter, but CodeAccessSecurityAttribute doesn't work if you
define your own constructors).

When applying the attribute to a class(-member) however, whenever I use
the named parameter of System.Type I get a COMException with message
"Unsupported type for field or property setter. (Exception from HRESULT:
0x8013144A)" somewhere after the constructor is run.

Is this a known issue? expected behaviour?

thanks in advance,

--
Willem van Rumpt


.