Quantcast
Viewing all articles
Browse latest Browse all 9076

Accessing CMS API outside of the request pipeline

We have built an admin page that allows site admins to select a page and press a button to copy that page out under a couple hundred container pages. The problem is, it takes a while so it times out. Currently, I'm trying to move this to execute on a background thread, but am running into the issue of ContentReference.Startpage being empty. Thanks to a post by Per Magne Skuseth in another thread, I found this quote from Ted Nyberg:

You may run into similar problems in scheduled jobs. One way around it is to add a wildcard binding (“*”) for your default site.

That will then be your default site definition (as in SiteDefinition.Current.StartPage or ContentReference.StartPage) when there’s no current site, or outside of web requests.

Is this referring to an IIS mapping or something within EPiServer? Right now, I'm running the site locally out of VS, but it will later be deployed to IIS7. How do I add this wildcard binding? He says "one way around it". Are there other ways? Are there other things in the API dependent on the http request that I won't be able to use to manage the site content from the background thread?


Viewing all articles
Browse latest Browse all 9076

Trending Articles