This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

M-Files Custom Application License

Hello,

I have implemented a licensing structure for one of our applications(it properly reports an invalid and valid license). I am just wondering if there is a preferred way to prevent the application from running if the license is invalid. 

I have setup my license according to the following documentation:
https://developer.m-files.com/Frameworks/Vault-Application-Framework/Licensing/#creating-a-licensed-vault-application-framework-application

Is there a proper way to prevent the application from working or is this just something where I set a boolean value and implement a check into my code to prevent things from happening?

Thanks,

Mitch

Parents
  • It's up to you to decide what should or shouldn't work, if the license is invalid, by checking the status of the license.

  • Let's say I want the entire application to stop functioning, I was just wondering what the best way to just kill the application or something along those lines. I know I can control things after checking the status of the license(and have already done so). I was just posting in best practices to find out what the best practice would be.

  • I don't know if it's a good practice, but this event might solve it.

    public override ScriptResult Run(ScriptEnvironment environment)
    {

    if (!License.LicenseStatus.IsValidLicenseStatus())// status
    throw new Exception("Contact administrator invalid license");

    return base.Run(environment);
    }

    It's worth doing some testing.

Reply
  • I don't know if it's a good practice, but this event might solve it.

    public override ScriptResult Run(ScriptEnvironment environment)
    {

    if (!License.LicenseStatus.IsValidLicenseStatus())// status
    throw new Exception("Contact administrator invalid license");

    return base.Run(environment);
    }

    It's worth doing some testing.

Children