30 Day Free Trial

The 30 Day Trial License which is made to you by ServiceStack, Inc. entitles you to evaluate any ServiceStack Software unrestricted for a period of thirty (30) days on Developers' workstations or test servers only.

Trial License Key

click to copy
Expires on Thursday, March 28, 2024

License Key Registration

The ServiceStack license key allows un-restricted access to ServiceStack packages and is available in your My Account Section after purchasing a commercial license

There's many ways of registering your license key with your top-level host projects:

a) Add it to the projects appsettings.json or Web.Config

Easiest way to register your license key for ASP.NET Core Apps is to add the servicestack license appSetting to appsettings.json:

{
    "servicestack": {
        "license": "{licenseKeyText}"
    }
}

Non ServiceStack .NET Core AppHost Apps (i.e. just using Redis or OrmLite) will also need to explicitly register the license key from IConfiguration:

Licensing.RegisterLicense(Configuration.GetValue<string>("servicestack:license"));

For .NET Framework Applications add it to the Web.config or App.config's <appSettings/> config section:

<appSettings>
    <add key="servicestack:license" value="{licenseKeyText}" />
</appSettings>

b) Add the System Environment Variable

When developing or hosting multiple ServiceStack Applications you can register the License Key once in the SERVICESTACK_LICENSE Environment Variable:

Variable               Value
SERVICESTACK_LICENSE   {licenseKeyText}

You'll need to restart IIS or VS.NET for them to pickup any new Environment Variables

c) Add it in code before your Application Starts Up

By calling Licensing.RegisterLicense() before your application starts up, E.g. For ASP.NET, place it in the Global.asax Application_Start event:

protected void Application_Start(object sender, EventArgs e)
{
    Licensing.RegisterLicense(licenseKeyText);
    new AppHost().Init();
}

Otherwise for a self-hosting Console Application, place it before initializing the AppHost, as shown above.

d) Copy license key text into an external text file

Similar to above, we can register the license from an external plain-text file containing the license key text:

protected void Application_Start(object sender, EventArgs e)
{
    Licensing.RegisterLicenseFromFileIfExists("~/license.txt".MapHostAbsolutePath());
    new AppHost().Init();
}

For Self-Hosting set BuildAction to Copy if Newer and use "~/license.txt".MapAbsolutePath() method.

The license key is white-space insensitive so can be broken up over multiple lines