# How to: Use HTTPS with a Domain Service

\[ **This document was written for WCF Services Version 1 Service Pack 2 and might not be up to date** \
&#x20;Please see [Release Notes](https://github.com/OpenRIAServices/OpenRiaServices/releases) or [Changelog](https://github.com/OpenRIAServices/OpenRiaServices/blob/main/Changelog.md) for a list of changes since WCF RIA Services ]

This topic explains how to configure the domain service to only accept requests made over HTTPS. This is done to improve the security of communication with a domain service. The resulting behavior is that domain service denies all requests made over HTTP. When a domain service is configured for HTTPS, the corresponding [DomainContext](https://github.com/OpenRIAServices/OpenRiaServices/tree/086ea8c8fcb115000749be6b2b01cd43bb95bf80/docs/ff422732.md) class that is generated for the client application also uses HTTPS for all requests.

To use HTTPS, you must perform several steps to configure your Web server. For more information, see [How to Set Up an HTTPS Service in IIS](http://go.microsoft.com/fwlink/?linkid=168709), and [Configuring HTTP and HTTPS](http://go.microsoft.com/fwlink/?linkid=168710). After you have configured your Web server, you must perform the following step to specify that the domain service uses HTTPS. For more information about network security and Silverlight, see [Network Security Access Restrictions in Silverlight](http://go.microsoft.com/fwlink/?linkid=195031).

## To require HTTPS with a domain service

* Set the RequiresSecureEndpoint() property to true when you apply the EnableClientAccessAttribute attribute to the domain service.

  ```
  <EnableClientAccess(RequiresSecureEndpoint:=True)> _
  Public Class AuthenticationDomainService
      Inherits AuthenticationBase(Of User)
  ```

  ```csharp
  [EnableClientAccess(RequiresSecureEndpoint = true)] 
  public class AuthenticationDomainService : AuthenticationBase<User>
  ```
