MSDN Library

EnableClientAccessAttribute Class

Marks a DomainService as accessible to clients.


Namespace: System.ServiceModel.DomainServices.Hosting
Assembly: System.ServiceModel.DomainServices.Hosting (in system.servicemodel.domainservices.hosting.dll)

[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple=false, Inherited=true)] 
public sealed class EnableClientAccessAttribute : Attribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple=false, Inherited=true) */ 
public final class EnableClientAccessAttribute extends Attribute
AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple=false, Inherited=true) 
public final class EnableClientAccessAttribute extends Attribute

<EnableClientAccess()>
Public Class MemberRegistrationService
    Inherits DomainService
    ' Class functionality here.
End Class

[EnableClientAccess]
public class MemberRegistrationService : DomainService
{
    // Class functionality here.
}

You must apply the EnableClientAccessAttribute attribute to a domain service to make it accessible to the client application. A DomainContext class is generated for each domain service that is marked with the EnableClientAccessAttribute attribute. When you create a domain service by using the Add New Domain Service Class wizard, the wizard contains a check box called Enable client access that is selected by default. The EnableClientAccessAttribute is applied to the domain service when this check box is selected.


System.Object
   System.Attribute
    System.ServiceModel.DomainServices.Hosting.EnableClientAccessAttribute

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

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003 , Windows Server 2008, and Windows 2000

Target Platforms

Show:
© 2016 Microsoft