We are in process of migrated one of our websites from on premise Windows Server 2008 to AWS Windows 2012 R2. However it's throwing an exception when we are invoking method FetchEntity(). Not sure if it is a compatibility issue or access problem on the new environment. Can you please advise?
That or mark the entity as 'fetched':
myCustomer.Fields.State = EntityState.Fetched;
however this exception stems from the fact you have either a new entity instance (which fields have no meaning, so check the IsNew property!) or you have saved an entity and read the fields afterwards.
Please have a look into my code below which is throwing outofsync exception. As you can see I am already marking State as Fetched, but still having issues.
public bool IsEnabled(string networkLogin)
SecurityUserEntity user = new SecurityUserEntity(base._applicationName, base._environmentName, networkLogin);
user.Fields.State = EntityState.Fetched;
throw new Exception("User <" + networkLogin + "> does not have access to this application <" + _applicationName + "> <" + _environmentName + ">");