Merge pull request #6187 from PaulDevenney/Bug/FixImportExportCommand

[Fixes #6181] Fixed bad assumption about HttpContext
This commit is contained in:
Sébastien Ros
2016-01-07 12:30:44 -08:00

View File

@@ -153,7 +153,9 @@ namespace Orchard.ImportExport.Providers.ImportActions {
PrepareRecipe(recipeDocument); PrepareRecipe(recipeDocument);
// Sets the request timeout to a configurable amount of seconds to give enough time to execute custom recipes. // Sets the request timeout to a configurable amount of seconds to give enough time to execute custom recipes.
_orchardServices.WorkContext.HttpContext.Server.ScriptTimeout = RecipeExecutionTimeout; if (_orchardServices.WorkContext.HttpContext != null) {
_orchardServices.WorkContext.HttpContext.Server.ScriptTimeout = RecipeExecutionTimeout;
}
// Suspend background task execution. // Suspend background task execution.
_sweepGenerator.Terminate(); _sweepGenerator.Terminate();