Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Change Commerce catalog export location


Hi all

I'm trying to export a Catalog.xml file with a product catalog using the Commerce Manager. The functionality seems to work very well, but the exported file is placed in this directory: \ImportExportRepository\ECApplication\catalog

Is it possible to specify another location for the exported file? Preferably somewhere outside the website root.

I haven't been able to find any documentation on where to change the location, but perhaps I haven't looked in the right page.

Thank you for your help.



Jan 18, 2017 13:33


You can have an appSetting section with the key of ECF.ImportExportFolder, points to the folder you want to save the catalog - it will be <your-dir>\ImportExportRepository\ECApplication\catalog

Make sure to set the permissions on that folder to your IIS user account.



Jan 18, 2017 14:31

Hi Quan

I tried to set the path to C:\temp, but got the error below.

It seems to me that you are using the System.Web.HttpServerUtility.MapPath method. The Remarks to this method contains this sentence: "However, you cannot specify a path outside of the Web application.".

I would very much like to be able to export the files to a location outside of the web application, so that we can separate the webapplication from all other files like e.g. logfiles and catalog exports.

[HttpException (0x80004005): 'C:/temp/ECApplication/catalog/' is a physical path, but a virtual path was expected.]
   System.Web.Util.UrlPath.CheckValidVirtualPath(String path) +11948079
   System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) +141
   System.Web.VirtualPath.Combine(VirtualPath relativePath) +185
   System.Web.HttpRequest.MapPath(VirtualPath virtualPath, VirtualPath baseVirtualDir, Boolean allowCrossAppMapping) +105
   System.Web.HttpServerUtility.MapPath(String path) +128
   Mediachase.Web.Console.Common.ManagementHelper.GetImportExportFolderPath(String appFolder) +394
   Mediachase.Commerce.Manager.Catalog.Tabs.CatalogExportTab.OnInit(EventArgs e) +218
   System.Web.UI.Control.InitRecursive(Control namingContainer) +166
   System.Web.UI.Control.InitRecursive(Control namingContainer) +379
   System.Web.UI.Control.AddedControl(Control control, Int32 index) +215
   Mediachase.Commerce.Manager.Core.Controls.EditViewControl.CreateTabs() +1121
   Mediachase.Commerce.Manager.Core.Controls.EditViewControl.CreateChildControls() +30
   System.Web.UI.Control.EnsureChildControls() +115
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Page.OnInitComplete(EventArgs e) +11892713
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +595

Jan 19, 2017 9:39


I missed " Preferably somewhere outside the website root" - That's not possible with the default implementation because it uses Server.MapPath on the value you set for ECF.ImportExportFolder. However you can still replace the default implementation with your own to lift that restriction. The question is if you would go that way ...

Jan 19, 2017 9:53

Hi Quan

How woud I go about implementing my own solution to lift the restriction?

I guess that I could use the Mediachase.Commerce.Catalog.ImportExport.CatalogImportExport class and call the Export(...) method myself. In that way, I would need to make my own user interface to start the export, and then I can specify my own export path.

I guess that wouldn't be dificult, but is it woth the effort just to ensure that the catalog is exported outside the website root? That is something that I need to discuss with my project manager :-)

Thank you for your help and clarifications.



Jan 19, 2017 10:03

You can technically modify Apps\Catalog\Config\View\Catalog-Export.xml to let it use your own ascx instead of the default one. Mind you it can be a bit troubling when it comes to upgrade :)

Jan 19, 2017 10:08

Yes, I guess that would also be possible. However I haven't tried to modify the Commerce Manager UI before, so I don't think we would go that way. And as you say, there may be upgrade issues as well. I think it would be more likely that we would add an export page to the CMS->Admin -> Tools section instead. At least that is something we have tried before :)

But still, this is only something we expect to use once in a while, so I don't know if it is relevant to spend time working on.



Jan 19, 2017 10:35
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.