Generating a report is saved on disk instead of in blob can cause problems for non-sticky load balanced environment

Found in

EPiServer.Forms 4.28.0

Fixed in

EPiServer.Forms 4.29.1

Created

Apr 16, 2020

Updated

Jul 01, 2020

State

Closed, Fixed and tested


Description

The problem is when generating a report specificly the call

https://www.abc.se/EPiServer/EPiServer.Forms.UI/DataExporting/PrepareExport

It saves the file to the disk using Path.GetTempPath() eg the systems temp path. That means that the callback in a non sticky load balanced enviroment most likely will hit another instance when trying to get the file.

A good option for where to save it is in the blob storage if there is one configured.

In order to use Azure blob storate
1. Add config to web.config

<episerver.framework>
  <blob defaultProvider="azureblobs">
      <providers>
        <add name="azureblobs" type="EPiServer.Azure.Blobs.AzureBlobProvider,EPiServer.Azure"
              connectionStringName="EPiServerAzureBlobs" container="mycontainer"/>
      </providers>
  </blob>
...

2. In Forms.config add setting to use the provider

<episerverforms dataExportBlobProviderName="azureblobs">