I need to execute a process via a batch job that will on a nightly basis create content from external sources.
To do this, I created a console app to make the applicable Sitefinity API calls. For the app.config file, I used similar content from the web.config file of the main site.
However, this approach is failing because it seems that the API expects to be running within an HttpContext.
I tracked down a couple of the root causes. In one case it is any cmsEngine provider with the attribute urlRewriteFormat set:
CmsHttpRequest request = new CmsHttpRequest(this.urlRewriteFormat);
this.contentExtension = request.LongExtension;
In another case, it was specific to the Initialize method of the wiki XmlProvider:
this.dataFile = HttpContext.Current.Request.MapPath(config["dataFile"]);
I wonder if it is possible to mock up an HttpContext, or find another approach to overcome this limitation with the API?