none
Configure a WCF RIA Service with a Secure Endpoint in web.config

    Question

  • The standard method to configure a WCF Ria Service with a secure endpoint (SSL) is to set RequiresSecureEndpoint = true on the EnableClientAccessAttribute as shown below:

    [RequiresAuthentication] 
    [EnableClientAccess(RequiresSecureEndpoint = true)] 
    public class Module1DomainService : LinqToEntitiesDomainService<AdventureWorksDataModel> 
    { 
          . 
          . 
          . 
    } 
    

    I need to know if the RequiresSecureEndpoint = true option can be set in the web.config file or if there's an equivalent method to create a secure endpoint (SSL) for a WCF RIA Service.

    Wednesday, November 02, 2011 7:59 PM

Answers

All replies

  • Hello, I haven't tried that. However I don't think you can do that if you use the default binary endpoint. But if you use a SOAP endpoint, you can try to define a global basicHttpBinding that uses transport security, which may also be applied to RIA services. Similarly, for JOSN/OData endpoints, you can define a global webHttpBinding.

        <bindings>
          <basicHttpBinding>
            <binding>
              <security mode="Transport"/>
            </binding>
          </basicHttpBinding>
        </bindings>


    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    Windows Azure Technical Forum Support Team Blog
    Friday, November 04, 2011 1:30 AM
  • What you're saying may work with the SOAP or JSON endpoints; but what I'm really looking for is a way to restrict my domain service to ONLY the secure endpoint from the web.config file; by default RIA Services spins up with both non-secured and secured enpoints if the IIS application has both http and https bindings. I can use the [EnableClientAccess(RequiresSecureEndpoint = true)] attribute in code to restrict the domain service to only the https endpoint but I really can't leave this to a code change, I have to find a way to do this from the web.config and can't believe that MSFT doesn't expose this switch from the web.config.

    Monday, November 07, 2011 1:26 PM
  • Currently this is not supported. You have to use code. You can submit a feature request on http://dotnet.uservoice.com/forums/57026-wcf-ria-services.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    Windows Azure Technical Forum Support Team Blog
    • Marked as answer by SteveFortune Tuesday, November 08, 2011 7:09 PM
    Tuesday, November 08, 2011 1:11 AM
  • I have added this feature request as you have suggested.
    Tuesday, November 08, 2011 7:11 PM