Configuration

To setup iLangL Web Service web.config must be modified with the following settings:

<configuration>

<!-- add configuration section -->

<section name="LocalizationConfiguration" type="iLangl.Episerver.WebAPI.LocalizationConfigurationSection, iLangl.Episerver.WebAPI"/>

<LocalizationConfiguration username="username"  securityToken="this is a security token @#$%^&*()_RT@$R25"/>

<!-- 

username - the name of the Episerver user account that will impersonate interaction between iLangL web service and Episerver. Episerver account must have read/write permissions to all items included in translation scope

securityToken -  is used to authenticate all requests to iLangL Web service from the iLangL side. Please generate new security token in this field and share this token with the authorized person responsible for localization flow at iLangL or translation agency side

-->

  <system.serviceModel>

<!-- Add new behaviour to serviceBehaviors -->

    <behaviors>

      <serviceBehaviors>

<behavior name="LocalizationServiceBehaviour">

<serviceMetadata httpsGetEnabled="true" httpsGetEnabled="true"/>

<serviceDebug includeExceptionDetailInFaults="true" />

</behavior>

<!-- Add new service to services-->

    <services>

<service name="iLangl.Episerver.WebAPI.LocalizationService" behaviorConfiguration="LocalizationServiceBehaviour">

<endpoint 

address="" 

binding="webHttpBinding" 

bindingConfiguration="HttpsBinding"

contract="iLangl.Episerver.WebAPI.ILocalizationService" 

behaviorConfiguration="web"/>

</service>

 

   <bindings>

….

       <webHttpBinding>

          <binding name="HttpsBinding">

             <security mode="Transport">

               <transport clientCredentialType="None"/>

            </security>

          </binding>

</webHttpBinding>

...

     <endpointBehaviors>

        <behavior name="web">

          <webHttp />

        </behavior>

      </endpointBehaviors>

How to check configuration?

You can ping the getlanguages endpoint

https://[website url]/LocalizationService.svc/Languages

You need to specify a security token as a header with the value provided in the web.config at LocalizationConfiguration section. The header name ‘securitytoken’.

Example: