In the following code...
var contactManager = GetContactManager();
var contact = contactManager.LoadContactReadOnly(contactId);
if (contact == null)
{
Log.Info("MySite.Presentation.Controllers.ExperienceProfileController.GetAdditionalInfo: Contact not found!: " + contactId.ToString(), this);
throw new ContactNotFoundException();
}
... contact is apparently null
because the ContactNotFoundException is being thrown.
The odd thing is that the contact DOES appear to exist. For example, passing a contactId
of f5a28b73-f58b-44f2-a011-4d76bb4984c9
(or any other GUID) results in this error being thrown.
But when I execute the following in the MongoDB...
db.getCollection('Contacts').find({"_id" : NUUID("f5a28b73-f58b-44f2-a011-4d76bb4984c9")})
... I get back a valid result, with visits, etc.:
This code worked fine with 8.1 Update 2/xDB 1.0, but does not work with 8.2 Update 2/xDB 2.0.
Does anyone have any ideas why this behavior would be occurring and how to fix it?