V4 Documentation

NCrunch License Server


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.

Licensing Behaviour

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.

License Transfer / Lease Termination

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.

License Server Unique ID

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:

  1. Download the license server from the NCrunch download page
  2. Find a good place on disk to install the server. Usually IIS applications are installed under c:\inetpub
  3. Create a new directory for the license server
  4. Unzip the contents of the package into the new directory
  5. Open the Internet Information Services (IIS) Manager
  6. Right click 'Application Pools', choose 'Add Application Pool'
  7. Enter the following settings and click OK:
    Name = NCrunch License Server
    .NET CLR Version = .NET CLR Version v4.0.30319
    Managed pipeline mode = Integrated
    Start application pool immediately = checked
  8. Right click on 'Sites', choose 'Add Website'
  9. Choose a site name (i.e. 'NCrunch License Server') and select the physical path you've extracted the ZIP file to. Select the new application pool for this site. You may wish to set up a different port or host name depending upon your network configuration. Click OK to create the site.
  10. Open windows explorer to the license server install path, find the 'Data' directory
  11. Right click on this directory, go to properties, security
  12. Click on 'Edit' then 'Add'
  13. Click on 'Locations', ensure that you select the machine hosting the IIS server itself (not the windows domain if you are using one)
  14. Enter the object name: IIS AppPool\NCrunch License Server
  15. Click 'Check Names'. If the name doesn't check out, make sure your object name is consistent with the name of the application pool you created
  16. Click 'OK'.
  17. Ensure you check the 'Modify' permission so that the server has write access to the Data directory
  18. Click 'OK'. The license server admin interface should now be accessible via web browser, and it should be possible to point NCrunch clients at this server's web address to use it for licensing
  19. Open a web browser and browse to the license server. You should receive a prompt to enter the admin password. The default password is 'admin'
  20. Go to 'Change Password'
  21. Choose a new admin password and click 'Submit'. Make sure you store this password in a safe place, as it cannot be recovered and you will need to wipe the license server database if it is lost

SSL Support

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:

  1. An applicable SSL certificate must be installed on the license server (IIS)
  2. The SSL certificate must be assigned to the web site in IIS
  3. The certificate must be recognisable on the client machines accessing the license server. Self-signed certificates will likely need to be installed manually because the NCrunch client relies on standard .NET HTTP communication components and will abort any connection request to a server using an unrecognised certificate.

Auto Configuration of License Server for NCrunch Client

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.

Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download