I'm developing a webservice that uses EpiServer API to read and write information from/to the CMS. I'm not using EpiServer webservices, but just referencing the EpiServer dlls directly in my webservice project.
I can read any page information from the CMS using DataFactory.Instance.GetPage, but I cannot create a new page using DataFactory.Instance.CreateLanguageBranch. I get "Access was denied to page nnnn".
The site has Windows authentication so I guess I need my code to authenticate somehow before trying to create a new page, but I cannot seem to figure out how.
Thanks in advance.
Have you tried using AccessLevels when creating your language branch? Try setting the AccessLevel to NoAccess when calling:
CreateLanguageBranch(PageReference, ILanguageSelector, AccessLevel)
That solved my issue. I used it before but with FullAccess (I thought that should be the option to give me full access to modify all pages). But as you suggested, it should be NoAccess.