Authentication fails and the error "Unable to validate PIN code for 'username'. Exception: Object reference not set to an instance of an object." is displayed in the AuthAnvil event log.
AuthAnvil cannot read the database cipher key from the registry. This usually means that AuthAnvil app pools are set to 32 bit mode in a 64 bit version of IIS 7.
Open the IIS Manager, expand the server and click on Application Pools. For each AuthAnvil application pool (AuthAnvilAdmin, AuthAnvilADUS, AuthAnvilManager, AuthAnvilSAS, and AuthAnvilSelfService), right click on the application pool, click "Advanced Settings", Under General, set "Enable 32-bit Applications" to False, and click OK.
AuthAnvil 4.0 on 64 bit versions of IIS 7 and 7.5 (Windows Server 2008 and Later).
If you have any questions or need some help, we would be happy to assist. Open a case at kaseya.zendesk.com .