I'm writing a some custom code for AbleCommerce, when I call the following from my code:
if (!Membership.ValidateUser(user, pass))
throw new SecurityTokenException("The user does not exist or was not validated with the given password.");
The following exception is thrown:
The INSERT statement conflicted with the FOREIGN KEY constraint "ac_Stores_ac_AuditEvents_FK1". The conflict occurred in database "f3256_ablecommerce", table "dbo.ac_Stores", column 'StoreId'.
The statement has been terminated.
Obviously, it some context isn't being set. Any ideas? Thanks.
Membership.ValidateUser Throws a SqlException
-
- Lieutenant (LT)
- Posts: 78
- Joined: Wed Mar 05, 2008 11:27 am
Re: Membership.ValidateUser Throws a SqlException
Are you using the custom code inside AbleCommerce? If no then thats what causing the problem. AbleCommerce needs a context token that is initialized and it also takes into account the store license.