PolicyAttribute Class
Instructs the Web Services Enhancements for Microsoft .NET Framework (WSE) to apply the specified policy to the Web service methods within a class or to a client proxy class. This class cannot be inherited.
Namespace: Microsoft.Web.Services3
Assembly: Microsoft.Web.Services3 (in microsoft.web.services3.dll)
Namespace: Microsoft.Web.Services3
Assembly: Microsoft.Web.Services3 (in microsoft.web.services3.dll)
Use this attribute to apply policy to a Web service or Web service client. Although policy can be defined in code or in a policy file, for Web services the policy must be applied using the PolicyAttribute attribute. For Web service clients, the policy can be applied using the PolicyAttribute attribute or using the SetPolicy method. For more information about defining the policy in a policy file and then applying the policy using the PolicyAttribute attribute, see How to: Secure a Web Service Using a Policy File. For more information about defining the policy in code and then applying the policy using the PolicyAttribute attribute, see How to: Secure a Web Service Without Using a Policy File.