Groups | Blog | Home
all groups > dotnet security > may 2006 >

dotnet security : CodeAccessSecurityAttribute and named parameters of type System.Type


Willem van Rumpt
5/12/2006 12:00:00 AM
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,

--
Nicole Calinoiu
5/12/2006 10:22:05 AM
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.



[quoted text, click to view]

Willem van Rumpt
5/12/2006 5:02:13 PM
[quoted text, click to view]

Yeah, couldn't find anything in the docs or on the net either.
Thanks for the info, I've submitted a bug report, we'll see what happens
next :)

--
AddThis Social Bookmark Button