If you don't have a license and you are using the trial version, the constructor Cryptoki("cryptoki.dll"); shows a messagebox with the trial message.
If you are using NCryptoki under IIS such a messagebox is shown in the system desktop and you will never see it and you cannot click on OK to remove the messagebox and exit from the constructor.
To use NCryptoki under IIS you should buy a license