Login to Manager fails after installation and the Event log displays a subscription error

Issue

After installing AuthAnvil Two Factor Auth you are unable to log into the AuthAnvil Manager (2FA), or AuthAnvil Single Sign On (SSO) (if installed). There is also an error in the AuthAnvil event log:

Error: GetSubscriptionStatus() failed. Exception: String was not recognized as a valid DateTime.

Cause

AuthAnvil date-time formats default to the standard: mm-dd-yyyy (12-31-9999). In other continents or regions, there may be alternate date-time formats such as dd-mm-yyyy in Australia and most of Europe. In most web servers, the .NET Globalization settings are configured to default values, meaning they do not override to the localized settings. This creates a conflict in AuthAnvil Two Factor Auth as our subscription server is expecting the default format (mm-dd-yyyy) but the server date-time is using something different.

Resolution

Open up the IIS Manager on the AuthAnvil server and make the following change:

Expand Sites and click on the web site where AuthAnvil is installed.

In the main panel under ASP.NET, open ".NET Globalization".

If the "Culture" and "UI Culture" are both set to "Invariant Language (Invariant Country)" then our code is defaulting to the North American date/time format: mm-dd-yyyy. I assume your server uses dd-mm-yyyy, which is why the formatting is invalid.

Set both values to your regional setting (i.e. English (United Kingdom) (en-GB)) and Apply the changes.

Run an IISreset in the command prompt, then open up your browser again and log in.

Affects

AuthAnvil Two Factor Auth v4.5 and later

Questions?

If you have any questions or need some help, we would be happy to assist. Open a case at kaseya.zendesk.com .