Not that I've ever gotten any reponse to questions in the past, but I don't
know where else to turn.
I have a remoting application (.NET 2.0, VS 2005, C#) with a custom
ChannelSinkProvider as described in this article
http://msdn2.microsoft.com/en-us/library/ms973909.aspx
This example uses role-based security by way of decorating each method with
[PrinciplePermissionAttribute(SecurityAction.Demand , Role="Administrator")]
or some other programmer defined role.
It works fine... the problem is, the user has no idea why the action is not
being performed, it just silently fails if the user is not a member of the
specified role. I would like to capture this SecurityException message and
send it back to the user as a Response to their request, then handle the
Response by printing it to the status bar in the client application.
But I can't figure out where to capture this exception and create the
response message because it's an attribute on the method. Where would the
exception occur? My code is identical to the code at the above website.