Users log out very quickly

The reason for users logging off is because of error in validation of forms-authentication data and view-state data. It could happen for different reasons including using web farm in hosting services.You should check <machineKey> in your project webconfig. Check here for details about that. If you don’t have<machineKey>in your webconfig, try adding this piece of … Read more

Return Last ID (IDENTITY) On Insert row VB.NET MySQL

You can use an double Query and use the function LAST_INSERT_ID() After run your first query to get the last current query: Dim insert_coupon_query As String = (“INSERT INTO qa_discountcoupons (status_code) VALUES (5); SELECT LAST_INSERT_ID()”) Dim cmd_query As New MySqlCommand(insert_coupon_query, objConn) Dim cmd_result As Integer = CInt(cmd_query.ExecuteScalar()) MsgBox(cmd_result)

There is already an object named ‘AspNetRoles’ in the database

Add-Migration InitialMigrations -IgnoreChanges This should generate a blank “InitialMigration” file. Now, add any desired changes to the class you want. Once changes are added, run the update command again: update-database -verbose Now the automatic migration will be applied and the table will be altered with your changes. Edit: Here is a solution to migrate identity … Read more