We have moved to GitHub Issues
Created by Richard Soeteman 12 Jan 2013, 07:08:00 Updated by Sebastiaan Janssen 14 Jan 2013, 18:15:01
When I create a document using a handler that is called via a scheduled task (CMSImport) I get the following exception.
System.ArgumentException occurred HResult=-2147024809 Message=The Cookie containing the UserContext Guid Id was null Parameter name: Cookie Source=Umbraco.Core ParamName=Cookie StackTrace: at Umbraco.Core.Services.UserService.GetCurrentBackOfficeUser(HttpContextBase httpContext) at Umbraco.Core.Services.ContentService.SetWriter(IContent content, Int32 userId) at Umbraco.Core.Services.ContentService.Save(IContent content, Int32 userId) at umbraco.cms.businesslogic.web.Document.MakeNew(String Name, DocumentType dct, User u, Int32 ParentId) at CMSImportLibrary.Import.ContentImporter.Import(ImportState state, User importAsUser, ImportStatistics importStatistics, String parentDataRelationKey, Int32 parent, String datasourceFile) InnerException:
This is a funny one, as it looks like there is an HttpContext but it cannot retrieve the umbraco auth cookie (probably because there is no current user), but a bit odd it reaches this point. What User/UserId are you passing to the Document.MakeNew method?
In this case the Admin user (0) but it can be any available user.
Assignee: Morten Christensen
Backwards Compatible: True
Affected versions: 6.0.0
Due in version: 6.0.0