When the license is correctly set, this error is thrown when NCryptoki was not able to load the underlying PKCS#11.
Mainly, the LoadLibrary fails when trying to load your PKCS11 dll.
This may be do to one of the following:
1) IIS is working as a 64bit service (on a 64bit server) and you are trying to load a 32bit PKCS#11 dll
or
2) IIS doesn't have the permission to read and load your PKCS#11 dll or one of its dependencies