Relative Content

Tag Archive for c#.netrest

How to Implement Custom Two-Factor Authentication (2FA) in My Application?

I want to implement two-factor authentication (2FA) in my application, where the 2FA codes are stored in the database. I want 2FA to be optional and only enabled for selected users. I am not sure how the login flow should look and what attributes I should check during the login process. Could you provide guidance on the database structure and example REST API endpoints?

Added columns to import table but having issues parsing “Input string was not in a correct format.”

I’m having an issue with a piece of code that handles data parsing from a DataRow into a custom model AssetItemImport. The specific problem occurs when I try to set the ECNs field in DataRow to a non-empty string, like ‘test’. When ECNs is empty, everything works perfectly, but with any non-empty string, an error occurs even though ECNs should simply receive a value from the Asset field.