We are using the Enterprise Library 4.1 Exception Handling Application Block's ExceptionShielding feature in combination with a custom RoleProvider with our WCF services. When the RoleProvider determines an user is not in a role and returns false from the IsInRole method, the following exception is occurring:
System.ServiceModel.Security.MessageSecurityException, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 No signature message parts were specified for messages with the '{XXX}' action.
WCF then aborts the RequestContext of the service operation, and the client times out.
I have attempted the solution referred to at this link with no success:
http://www.codeplex.com/entlib/Thread/View.aspx?ThreadId=25236
We also removed the System.Exception exception type from the EHAB policy, effectively having EHAB doing nothing for this policy, and this has no effect. The only thing that prevents this exception is commenting out the ExceptionShielding attribute on the service implementation.
Any fix for this issue would be much appreciated.