In order to successfully run the Custom Auth Sample Application bundled with the SmartSDK development kit, the User Authentication Management Setting in WIM must be set to either "LDAP" or "Custom Authentication". The latter is more common on recent firmware releaes.
In the SmartSDK Developer's Guide the documentation for setting up Custom Authentication refers to Smart Operation Panel > Development Guide > Authentication Customization > 01. Authentication Customization in order to enable Custom Authentication. In Functions details > 2. Setting procedure there are instructions to "Go to User Tools - System Settings - Administrator Tools - User Authentication Management Setting and enable LDAP authentication."
This should read "Go to User Tools - System Settings - Administrator Tools - User Authentication Management Setting and enable Custom Authentication (or LDAP, if Custom does not exist) authentication."