Condividi tramite


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)

Usage

'Usage
Dim policyName As String
Dim policyAttribute1 As New PolicyAttribute(policyName)

Syntax

'Declaration
NotInheritable Public Class PolicyAttribute
    Inherits Attribute
    Implements IPipelineProvider
public sealed class PolicyAttribute : Attribute, IPipelineProvider
public ref class PolicyAttribute sealed : Attribute, IPipelineProvider
public final class PolicyAttribute extends Attribute implements IPipelineProvider
public class PolicyAttribute extends Attribute implements IPipelineProvider

Remarks

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.

Inheritance Hierarchy

System.Object
   System.Attribute
    Microsoft.Web.Services3.PolicyAttribute

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server

Target Platforms

See Also

Reference

PolicyAttribute Members
Microsoft.Web.Services3 Namespace