> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LicensingSettings.xml ファイルについて

LicensingSettings.xml file には、ABBYY FlexiCapture SDK の保護設定が含まれています。このファイルは、ネットワーク上で [Licensing Service](https://docs.abbyy.com/ja/flexi-capture/sdk/distribution/installinglicenseservice.md) を正しく動作させるために必要です。ローカルのコンピューターで Licensing Service を使用する場合も、ハードウェア保護キーを使用するときはこのファイルが必須です。

このファイルは、開発者インストールまたはランタイムインストールを自動モードで実行すると自動的に生成されます。設定の XML スキームは LicensingSettings.xsd ファイルに定義されています。このファイルは Inc フォルダー (Start > プログラム > ABBYY FlexiCapture 12 SDK > Include Files Folder) にあります。

## Licensing Service の設定の変更

Licensing Service の設定は、主に次の 2 つの区分で構成されます。

* 現在のコンピューターにインストールされている Licensing Service の設定 (\<LocalLicenseServer> タグで指定します)
* Licensing Service がインストールされているネットワークサーバーとの接続パラメーター (\<LicensingServers>\<MainNetworkLicenseServer> タグで指定します)

ABBYY FlexiCapture SDK をローカルコンピューターにインストールしている場合は、必要に応じて \<LocalLicenseServer> の設定のみを指定します。一方、ABBYY FlexiCapture SDK をネットワーク環境で使用する場合は、\<LocalLicenseServer> のパラメーターをサーバー側で、\<LicensingServers>\<MainNetworkLicenseServer> のパラメーターをワークステーション側で指定します。1 台のコンピューターをサーバーとワークステーションの両方として使用する場合は、\<LocalLicenseServer> と \<LicensingServers>\<MainNetworkLicenseServer> の両方のパラメーターを指定する必要があります。詳細については、以下の各タグの説明を参照してください。

> [accordion] TCP/IP ポートを変更するには
>
> Licensing Service は、デフォルトで TCP/IP ポート 3024 を使用します。Licensing Service がインストールされているコンピューターでこのポートが閉じている場合、Licensing Service は動作しません。その場合は、\<LocalLicenseServer> タグまたは \<LicensingServers>\<MainNetworkLicenseServer> タグの EndPointName 属性に、開いているポートを指定します。例:
>
> ```xml theme={null}
> <LocalLicenseServer>
>  <ConnectionProtocol ProtocolType="TCP/IP" EndPointName="1025"/>
> </LocalLicenseServer>
> ```
>
> または
>
> ```xml theme={null}
> <LicensingServers>
>  <MainNetworkLicenseServer ServerAddress="computername" ProtocolType="TCP/IP" EndPointName="1025"/>
> </LicensingServers>
> ```

> [accordion] ハードウェア保護キーを無効にするには
>
> Licensing Service では、デフォルトでハードウェア保護キーとソフトウェア保護キーの両方を使用できます。ハードウェア保護キーを使用しない場合は、無効にできます。\<LocalLicenseServer>\<EnableCodeMeterLicenses> タグの Enable 属性を "no" に設定してください。
>
> ```xml theme={null}
> <LocalLicenseServer>
>  <ConnectionProtocol ProtocolType="<Protocol type>" />
>  <EnableCodeMeterLicenses Enable="no" />
> </LocalLicenseServer>
> ```

## プロキシサーバー経由でのライセンスのアクティベーション

マシンがプロキシサーバー経由でインターネットに接続されている環境でライセンスをアクティブ化する必要がある場合は、\<ProxyServer> タグで接続パラメーターを指定します。

サポートされているプロトコルは SOCKS5 と HTTP です。HTTP では Basic アクセス認証または認証なし、SOCKS ではユーザー名/パスワードによる認証または認証なしを使用できます。

以下は、プロキシサーバー経由でアクティベーションを行う場合のサンプルファイルです。

```xml theme={null}
<LocalLicenseServer>
  <ConnectionProtocol ProtocolType="Sockets" />
</LocalLicenseServer>
<ProxyServer Type="SOCKS" Host="192.168.56.1" Port="9090" Login="user" Password="password">
```

## プロキシサーバー経由でのオンライン ライセンスの使用

オンライン ライセンスに特別な設定は必要ありませんが、プロキシサーバー経由で接続する場合は、\<OnlineLicensing> タグでプロキシサーバーのパラメーターを指定する必要があります。

サポートされているプロトコルは HTTP です。認証方式としては、Anonymous、Basic、Digest の各[認証スキーム](http://docs.microsoft.com/en-us/dotnet/framework/wcf/feature-details/understanding-http-authentication)を使用できます。

以下は、オンラインライセンス認証用のプロキシサーバー設定を記述したサンプル ファイルです。

```xml theme={null}
<LocalLicenseServer>
  <OnlineLicensing Timeout="timeout_time" ProxyServer="http://<server_name>:<port_number>" ProxyAuth="<login>:<password>" />
  <ConnectionProtocol ProtocolType="<Protocol type>" />
</LocalLicenseServer>
```

## ライセンスサーバーの冗長構成のセットアップ

ネットワーク経由で配布されるライセンスでは、2 台のサーバーによる構成をセットアップできます。この構成では、一方のサーバーがオフラインになった場合に、もう一方のサーバーがバックアップとして機能します。

この場合、[ネットワーク](https://docs.abbyy.com/ja/flexi-capture/sdk/licensing/licensing.md#standalone-network)ランタイムライセンスが必要です。このライセンスは両方のライセンスサーバーでアクティブ化します。ワークステーションでは、\<LicensingServers>\<MainNetworkLicenseServer> タグと \<LicensingServers>\<BackupNetworkLicenseServer> タグに両方のサーバーのアドレスを指定する必要があります。各サーバーでは、\<LocalLicenseServer>\<RedundancyNetworkLicenseServer> にもう一方のサーバーのアドレスを同期設定とともに指定する必要があります。ライセンスの使用中、ワークステーションはメインのライセンスサーバーと通信し、ライセンスパラメーターと使用状況の統計情報を送信します。メインのライセンスサーバーは、このデータをバックアップサーバーと定期的に同期します。

メインのライセンスサーバーに障害が発生した場合は、バックアップサーバーがライセンス管理を引き継ぎ、ワークステーションから送られてくる情報を引き続き保存します。メインサーバーがオンラインに戻ると、ライセンスデータがバックアップサーバーと同期され、メインサーバーが再びライセンスの管理を開始します。ただし、メインサーバーが一定時間内に復旧しない場合、その時間が経過するとバックアップサーバーは機能を停止します。この時間はライセンスによって異なる場合があります。

メインサーバーの稼働中にバックアップのライセンスサーバーに障害が発生した場合、システムはライセンスサーバーが 1 台のみの場合と同様に動作し続けます。バックアップサーバーが復旧すると、メインサーバーと同期され、再びバックアップとして機能するようになります。

> [accordion] 冗長構成のサンプル
>
> ワークステーションの場合:
>
> ```xml theme={null}
> <LicensingServers>
>  <MainNetworkLicenseServer ServerAddress="mainserver" ProtocolType="TCP/IP" EndPointName="1025"/>
>  <BackupNetworkLicenseServer ServerAddress="backupserver" ProtocolType="TCP/IP" EndPointName="1025"/>
> </LicensingServers>
> ```
>
> メインのライセンスサーバーの場合:
>
> ```xml theme={null}
> <LocalLicenseServer>
>  <ConnectionProtocol ProtocolType="TCP/IP" EndPointName="1025"/>
>  <RedundancyNetworkLicenseServer ServerAddress="backupserver" ProtocolType="TCP/IP" EndPointName="1025"/>
> </LocalLicenseServer>
> ```
>
> バックアップのライセンスサーバーの場合:
>
> ```xml theme={null}
> <LocalLicenseServer>
>  <ConnectionProtocol ProtocolType="TCP/IP" EndPointName="1025"/>
>  <Redundancy NetworkLicenseServer ServerAddress="mainserver" ProtocolType="TCP/IP" EndPointName="1025"/>
> </LocalLicenseServer>
> ```

> [!NOTE]
>
> この構成を使用する場合は、ご使用のライセンスがこの構成に対応していることを事前にご確認ください。詳細については、営業担当者にお問い合わせください。

## タグの説明

<table width="100%">
  <thead>
    <tr>
      <th>
        **タグ**
      </th>

      <th>
        **型**
      </th>

      <th>
        **多重度**
      </th>

      <th>
        **親タグ**
      </th>

      <th>
        **説明**
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        LicensingSettings
      </td>

      <td>
        LicensingSettings。要素：

        <ul>
          <li>LocalLicenseServer</li>
          <li>LicensingServers</li>
        </ul>
      </td>

      <td>
        1
      </td>

      <td>
        いいえ
      </td>

      <td>
        保護設定。
      </td>
    </tr>

    <tr>
      <td>
        LocalLicenseServer
      </td>

      <td>
        LocalLicenseServerSettings.要素：

        <ul>
          <li>ConnectionProtocol</li>
          <li>EnableCodeMeterLicenses</li>
          <li>RedundancyNetworkLicenseServer</li>
        </ul>
      </td>

      <td>
        0...1
      </td>

      <td>
        LicensingSettings
      </td>

      <td>
        同じコンピューター上で動作する Licensing Service のパラメーター。
      </td>
    </tr>

    <tr>
      <td>
        ConnectionProtocol
      </td>

      <td>
        複合型。属性:

        <ul>
          <li>
            *ProtocolType* — プロトコルの種類。LocalInterprocessCommunication、NamedPipes、TCP/IP、Sockets のいずれか。
          </li>
        </ul>

        **注:** これは、ローカルの Licensing Service 用の追加のプロトコルの種類です。スタンドアロン
        ライセンスは常にプロトコルの種類 LocalInterprocessCommunication で使用されるため、スタンドアロンインストールではこの属性を指定する必要はありません。

        <ul>
          <li>
            *EndPointName* — (オプション) TCP/IP ポート。デフォルトは "3024" です。
          </li>
        </ul>
      </td>

      <td>
        0...1
      </td>

      <td>
        LocalLicenseServer
      </td>

      <td>
        接続プロトコルのパラメーター。
      </td>
    </tr>

    <tr>
      <td>
        OnlineLicensing
      </td>

      <td>
        複合型。属性:

        <ul>
          <li>
            *Timeout *—  (オプション) 再接続の間隔を指定します。
          </li>
        </ul>

        現在、プロキシサーバー経由の接続でサポートされているプロトコルは HTTP のみです。HTTP では次の属性を指定できます。

        <ul>
          <li>
            *ProxyServer — * (オプション) プロキシサーバーのアドレスと接続設定を、"*protocol://server:port*" 形式の文字列で指定します。各部分文字列の意味は次のとおりです。
          </li>
        </ul>

        <ul>
          <li>
            *protocol* — プロキシサーバーへの接続に使用するプロトコル。現在サポートされている値は HTTP のみです。
          </li>

          <li>
            *server* — プロキシサーバーの名前または IP アドレス。
          </li>

          <li>
            *port* — 接続ポート。
          </li>
        </ul>

        <ul>
          <li>
            *ProxyAuth — * (オプション) プロキシサーバーへの認証情報を、"*login:password*" 形式の文字列で指定します。各部分文字列の意味は次のとおりです。
          </li>
        </ul>

        <ul>
          <li>
            *login* — 認可に使用するユーザー名。
          </li>

          <li>
            *password* — 認可に使用するパスワード。
          </li>
        </ul>
      </td>

      <td>
        0...1
      </td>

      <td>
        LocalLicenseServer
      </td>

      <td>
        コンピューターでオンライン ライセンスを使用できるかどうかを指定します。
      </td>
    </tr>

    <tr>
      <td>
        EnableCodeMeterLicenses
      </td>

      <td>
        複合型。属性:

        <ul>
          <li>
            *Enable* — このコンピューターで CodeMeter プロテクションキーを使用できるかどうかを指定します ("yes" または "no" を設定) 。デフォルトは "yes" です。
          </li>
        </ul>
      </td>

      <td>
        0...1
      </td>

      <td>
        LocalLicenseServer
      </td>

      <td>
        このコンピューターで CodeMeter プロテクションキーを使用できるかどうかを指定します。
      </td>
    </tr>

    <tr>
      <td>
        RedundancyNetworkLicenseServer
      </td>

      <td>
        NetworkServerAddress.属性：

        <ul>
          <li>
            *ServerAddress* — 冗長化構成内のもう一方のサーバーの DNS 名または IP アドレス。
          </li>

          <li>
            *ProtocolType* — プロトコルの種類：LocalInterprocessCommunication、NamedPipes、TCP/IP、Sockets のいずれか。
          </li>

          <li>
            *EndPointName* —  (オプション) TCP/IP ポート。デフォルトは "3024" です。
          </li>
        </ul>
      </td>

      <td>
        0...1
      </td>

      <td>
        LocalLicenseServer
      </td>

      <td>
        2 台のサーバーによる冗長化構成で連携して動作する各ネットワークライセンスサーバーについて、もう一方のサーバーへの接続と同期の設定を指定します。
      </td>
    </tr>

    <tr>
      <td>
        LicensingServers
      </td>

      <td>
        複合型。要素:

        <ul>
          <li>MainNetworkLicenseServer</li>
          <li>BackupNetworkLicenseServer</li>
        </ul>
      </td>

      <td>
        0...1
      </td>

      <td>
        LicensingSettings
      </td>

      <td>
        Licensing Service がインストールされているネットワークサーバーの一覧。
      </td>
    </tr>

    <tr>
      <td>
        MainNetworkLicenseServer
      </td>

      <td>
        NetworkServerAddress.属性:

        <ul>
          <li>
            *ServerAddress* — Licensing Service がインストールされているコンピューターの DNS 名または IP アドレス。
          </li>

          <li>
            *ProtocolType* — プロトコルの種類: LocalInterprocessCommunication、NamedPipes、TCP/IP、または Sockets。
          </li>

          <li>
            *EndPointName* — (オプション) TCP/IP ポート。デフォルトは "3024" です。
          </li>
        </ul>
      </td>

      <td>
        1
      </td>

      <td>
        LicensingServers
      </td>

      <td>
        Licensing Service がインストールされているメインのネットワークサーバーへの接続パラメーター。
      </td>
    </tr>

    <tr>
      <td>
        BackupNetworkLicenseServer
      </td>

      <td>
        NetworkServerAddress.属性：

        <ul>
          <li>
            *ServerAddress* — Licensing Service がインストールされているコンピューターの DNS 名または IP アドレス。
          </li>

          <li>
            *ProtocolType* — プロトコルの種類：LocalInterprocessCommunication、NamedPipes、TCP/IP、Sockets のいずれか。
          </li>

          <li>
            *EndPointName* —  (オプション) TCP/IP ポート。デフォルトは "3024"。
          </li>
        </ul>
      </td>

      <td>
        0...1
      </td>

      <td>
        LicensingServers
      </td>

      <td>
        バックアップ用ネットワークライセンスサーバーへの接続パラメーター。
      </td>
    </tr>

    <tr>
      <td>
        ProxyServer
      </td>

      <td>
        ProxyServer。属性：

        <ul>
          <li>
            *Type* — プロキシサーバーへの接続に使用するプロトコル (SOCKS、HTTP) 。
          </li>

          <li>
            *Host* — プロキシサーバーの名前または IP アドレス。
          </li>

          <li>
            *Port* — 接続ポート。
          </li>

          <li>
            *Login* —  (オプション) 認証に使用するユーザー名。
          </li>

          <li>
            *Password* —  (オプション) 認証に使用するパスワード。
          </li>
        </ul>
      </td>

      <td>
        0...1
      </td>

      <td>
        LicensingSettings
      </td>

      <td>
        ライセンスのアクティベーションに必要な、プロキシサーバー経由のインターネット接続設定。
      </td>
    </tr>
  </tbody>
</table>

## サンプル

次のサンプルは、スタンドアロンインストール用のシンプルな LicensingSettings.xml file の例です。ローカルのプロセス間通信を使用します。ハードウェア保護キーは無効になっています。

```xml theme={null}
<?xml version="1.0" encoding="utf-8"?>
<LicensingSettings xmlns="http://www.abbyy.com/Protection/LicensingSettings">
 <LocalLicenseServer>
  <ConnectionProtocol ProtocolType="LocalInterprocessCommunication" />
  <EnableCodeMeterLicenses Enable="no" />
 </LocalLicenseServer>
</LicensingSettings>
```

以下に、ネットワークインストール用のシンプルな LicensingSettings.xml ファイルのサンプルを示します。ワークステーション用とサーバー用の 2 つのファイルです。Licensing Service は、"computername" という名前のコンピューターにインストールされています。サーバーとワークステーション間の通信には TCP/IP プロトコルを使用します。

ワークステーション用:

```xml theme={null}
<?xml version="1.0" encoding="utf-8"?>
<LicensingSettings xmlns="http://www.abbyy.com/Protection/LicensingSettings">
 <LicensingServers>
  <MainNetworkLicenseServer ServerAddress="computername" ProtocolType="TCP/IP" />
 </LicensingServers>
</LicensingSettings>
```

サーバーの場合：

```xml theme={null}
<?xml version="1.0" encoding="utf-8"?>
<LicensingSettings xmlns="http://www.abbyy.com/Protection/LicensingSettings">
 <LocalLicenseServer>
  <ConnectionProtocol ProtocolType="TCP/IP" />
 </LocalLicenseServer>
</LicensingSettings>
```

## 関連項目

[ABBYY FlexiCapture SDK ライブラリを使用するアプリケーションの配布](https://docs.abbyy.com/ja/flexi-capture/sdk/distribution/redistribution.md)

[ライセンスサービスのインストール](https://docs.abbyy.com/ja/flexi-capture/sdk/distribution/installinglicenseservice.md)
