Setting path to license.config in appsettings.json

Vote:
 

Hello.

Deploying a new v12 site, and need to know how to set the path to the license file using appsettings.json.

Does anyone know?

Regards,

Peder

#270513
Jan 25, 2022 12:07
Vote:
 

The values that can be set in the appSettings.json are all from classes Suffixed with "Options" at the end. I did a search and found

namespace EPiServer.Licensing
{
  public class LicensingOptions
  {
    public const string DefaultLicenseFile = "License.config";

    public string LicenseFilePath { get; set; } = "License.config";

    public string LicenseKeySignature { get; set; }

    public string LicenseKey { get; set; }
  }
}

So if think something like

{
  "EPiServer": {
      "Licensing": {
        "LicensingOptions": {
            "LicenseFilePath": "PATH"
            }
        }
    }
}

Might work but I've not testing it, but all Options classes SHOULD be settable.

It could also be just Licensing instead of LicensingOptions in that lower object

#270599
Edited, Jan 26, 2022 16:09
- Jan 28, 2022 6:35
Yup, that's the correct way.
Thanks
Vote:
 

Thanks Scott!

I'll test it.

#270610
Jan 26, 2022 18:55
Vote:
 

This came up once before on the forums -- in that thread, the answer they came up with was:

"EPiServer": {
    "CMS": {
      "LicensePath": {
        "Path": "./License.Staging.config"
#270737
Jan 27, 2022 23:11
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.