The NCrunch License Server is an optional component that can be installed on a secure internal network to automate the management of NCrunch license codes. The server contains a pool of centrally managed license codes that are leased to individual NCrunch clients as necessary. Once an NCrunch client has been correctly configured to connect to the license server, it should no longer be necessary to update license details on the client - this can all be controlled from the license server.
Although the license server is versioned alongside the NCrunch client, it uses a simplistic protocol that is rarely (if ever) expected to change. This means the server should usually be both backwards and forwards compatible with all versions of NCrunch from 2.15 onwards. Under normal circumstances there should be no need to upgrade the license server when upgrading client-side versions of NCrunch.
The server is an ASP.NET application and is administered entirely via web interface. This allows the licenses to be administered remotely, provided the user has the correct credentials to access the server.
The server works using a token system where individual leases (tokens) are correlated with individual license codes that have been registered with the system through the admin interface. When a client connects to the server requesting a license code, the server will identify the oldest issued license code that is able to be used by the client's version of NCrunch. The license code is then leased to the client and a token is issued with a 7 day lifespan. If no license exists that can be used by the client, the server will return a failure and the client's NCrunch toolset will be automatically disabled with an appropriate message.
Once a token has been issued to the client, the client does not need to access the server again for the duration of the token lifespan. However, the client will still try to connect to the license server when NCrunch is first enabled for a session. Where a connection is possible, the token will automatically be renewed for another 7 days. This means that a client should always have full use of NCrunch for up to 7 days after access to the license server is removed.
Because NCrunch licensing is per user (not per machine), license tokens are always associated with unique IDs provided by NCrunch clients. It is therefore possible for a user to re-use the same license across multiple machines, provided the same unique ID is specified in the client's licensing configuration, and the license is not used concurrently across the machines. For example, if a developer has both a desktop and a laptop using NCrunch, they will only require the use of one license on the server. This is allowed under the terms of the NCrunch license.
The license server admin interface allows leases to be released for reallocation purposes. This is useful for situations in which a developer has left the company and their allocated license code needs to be immediately reassigned to a new hire.
When selecting license server unique IDs for your team, it is recommended to use team member company email addresses. In this way, a license administrator can easily contact the user if their license needs to be reallocated.
Under NCrunch v2.15, the 'Unique ID' is referred to as a 'User Name' in the license details window. This was changed in v2.16.
From v2.17, it is possible to override the unique ID using a license server setting, forcing it to always be the user's login name regardless of what the user specifies.
The license server is an ASP.NET MVC 4 application running on v4.0 of the .NET framework. It is primarily run under IIS and has been tested to work under IIS7.
To set up the license server under IIS7, follow the steps below:
As NCrunch clients use HTTP to communicate with the license server, it should be possible to configure it to use SSL by specifying an HTTPS address for the server in the NCrunch client. For SSL to work correctly, the following conditions must be met:
From v2.17, the NCrunch client supports the automatic configuration of a license server address to simplify the usage of the license server on large sites. The first time NCrunch is launched on a machine, it will search for a text file, 'LicenseServerAddress.txt' inside its install directory (which is normally 'C:\Program Files (x86)\Microsoft Visual Studio XX.0\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 20XX'). Where this file exists, NCrunch will use it as the default license server address when prompting the user for their license details.
If you receive unusual errors from the license server or you lose the admin password, wiping the license server database will allow you to reset the server to its original install state.
To do this, simply stop the IIS process and delete the 'LicenseDb.dat' file underneath the website's 'Data' directory.