HTTPS Syncing with Agility CMS in ASP.Net

In order for Agility CMS to sync content with your ASP.Net web servers, we need to be able to connect to that server (push) and have it connect back to the content server (pull).

This is all facilitated by the Agility.Web assembly, available here on nuget.org.

Once in place, you also need to drop in a couple more things: an AgilityWebsiteService.svc file and some updates to your web.config file.

Most sites already have the .svc file in place, but you can also download it from this post.

The other change you'll need to look at is in the web.config file, specifically the system.serviceModel section, shown below. 

<system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
    <services>
      <service behaviorConfiguration="agilityWebsiteServiceBehavior" name="Agility.Web.AgilityWebsiteService">
        <endpoint binding="wsHttpBinding" bindingConfiguration="agilityWebsiteServiceBinding" contract="Agility.Web.IAgilityWebsiteService" />
        <endpoint binding="wsHttpBinding" bindingConfiguration="agilityWebsiteServiceBindingSSL" contract="Agility.Web.IAgilityWebsiteService" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="agilityWebsiteServiceBehavior">
          <serviceDebug includeExceptionDetailInFaults="true" />
          <serviceMetadata httpGetEnabled="true" httpGetUrl="" />
        </behavior>
        <behavior name="">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <wsHttpBinding>
        <binding name="agilityWebsiteServiceBinding" receiveTimeout="00:30:00" maxReceivedMessageSize="2147483647">
          <security mode="None">
            <transport clientCredentialType="None" />
            <message establishSecurityContext="false" />
          </security>
        </binding>
        <binding name="agilityWebsiteServiceBindingSSL" receiveTimeout="00:30:00" maxReceivedMessageSize="2147483647">
          <security mode="Transport">
             <transport clientCredentialType="None" />
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
  </system.serviceModel>

Once you have those things setup you can test it by hitting the service endpoint:  https://mysite.com/AgilityWebsiteService.svc

Now, you can set the value in the Agility Syncing Web Server as https://mysite.com

Https-Syncing-Web-Server.jpeg

Once you set this value, you can double check that everything is working ok by looking at Web Logs in Settings.  This will access the Agility web logs on your server using service endpoint we just setup.  The same endpoint is used when a content sync is performed.

settings-web-logs.jpeg

 If you have any trouble getting this setup, let us know and we'll help you out!

1 out of 1 found this helpful

Comments

1 comment

Please sign in to leave a comment.