c# - WCF PrincipalPermission Attribute Exception loggin -
I have a WCF service on which there are methods of the principalprimation attribute when the user has appropriate permissions to access those methods. If you try, the feature is thrown away by the Security Execution, but when the exception is thrown into the property, it is not possible to turn the attempt around the call.
I tried to experiment with a logging handler using the exception shilling attribute from the Enterprise Library but it does not write any logs to write a WCF behavior extension to try and catch the exception Also try, but extensions can not match the exception management properly.
Does anyone have a good idea of getting this?
Two suggestions for you:
1) new PrincipalPermission (. ..). Instead of the attribute (
).
2) Take a look at the comments (# 5 I think). Ignore the link given to that code - the code is here. Nick Berardi has created an exception handler feature to turn the exceptions specified in web reactions. Now it does not match your scenario very much, but its class will have to catch the exception thrown by the principal permit attribute, so you can use the same principal.
Comments
Post a Comment