November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
I was able to resolve this on saving the content by settting up the priciplal on the current thread
WindowsIdentity myIdentity = WindowsIdentity.GetCurrent();
IPrincipal wp = new WindowsPrincipal((WindowsIdentity)myIdentity);
Thread.CurrentPrincipal = wp;
but when I try to associate the image with Variation, I get the same access issue
var variant = (VariationContent)contentLoader.Get<VariationContent>(variantLink).CreateWritableClone();
variant.CommerceMediaCollection.Add(commerceMedia);
contentRepository.Save(variant, EPiServer.DataAccess.SaveAction.Publish);
Thanks,
Hi,
Did you try with contentRepository.Save(variant, EPiServer.DataAccess.SaveAction.Publish, AccessLevel.NoAccess); ?
Regards.
/Q
I have a consoled based application that imports assets (images) for the catalog products in EPI Server.
The program creates the blob successfully but when I call the _contentRepository.Save(file, EPiServer.DataAccess.SaveAction.Publish); I get an error saying "Access was denied to content 157. The required access level was "Create, Publish""
Running the same code within Website context does not give me that acception.
I am running the consoled based application as admin so access level should not be a problem.
Thanks,
Syed