ePortal error - Long Path Names
Question / Problem:
On a specific system we are getting this error from ePortal:
2019-03-15 15:38:46,246 [4] ERROR Source App: efSimpleAuto.exe, ePortal: ePortal System.Exception: Can't enable hardlinks for Root="D:\ePortal\Temp" and WorkDir="C:\Users\a-ae43661\AppData\Local\Temp\3\". The Root and WorkDir must point to the same drive.
at TiS.Import.ePortal.Common.LongPath.LongPathConfiguration.AddProxyWorkDir(String root, String workDir, Boolean useHardLinks, Boolean disableRootCheck, Boolean disableDriveTypeCheck) in C:\Data\Git\ePortal\src\Common\LongPath\LongPathConfiguration.cs:line 43
at TiS.Import.ePortal.ePortalEngine.Config.Configuration.LoadFromXml(ClsConfiguration confXml, String stationName) in C:\Data\Git\ePortal\src\ePortalEngine\Config\Configuration.cs:line 188
at TiS.Import.ePortal.ePortalEngine.Config.Configuration.LoadFromXml(String path, String stationName) in C:\Data\Git\ePortal\src\ePortalEngine\Config\Configuration.cs:line 141
at TiS.Import.ePortal.ePortalEngine.Config.Configuration.GetInstance(String path, String stationName) in C:\Data\Git\ePortal\src\ePortalEngine\Config\Configuration.cs:line 122
at TiS.Import.ePortal.ePortalStation.ConfigurationEflow.GetInstance(ITisClientServicesModule csm, String stationName) in C:\Data\Git\ePortal\src\ePortalStation\ConfigurationEflow.cs:line 49
at TiS.Import.ePortal.ePortalStation.ePortalStation.GetEPortalConfig(ITisClientServicesModule oCSM, String stationName) in C:\Data\Git\ePortal\src\ePortalStation\ePortalStation.cs:line 177
at TiS.Import.ePortal.ePortalStation.ePortalStation.OnLogin(ITisClientServicesModule oCSM) in C:\Data\Git\ePortal\src\ePortalStation\ePortalStation.cs:line 95 . Details : Application: RO_Extract Station: ePortal Machine: S6AAWCWI2A07 Process ID: 4612
As a note, eflow and eportal are installed on the D: drive for customer’s policies, but we have this on several environments and never encountered this problem.
Answer / Solution:
We found this in the ePortal.appconfig file and setting this to false solved the issue.
<WorkDir Root="D:\ePortal\Temp" UseHardLinks="true" />
This feature is related to supporting names longer than 250+ characters.
ePortal supports that but 3rd party dlls, like perhaps Aspose or FreeImage, don’t.
In order to make ePortal work with those libraries, each file with long name must be duplicated into short name.
If the ePortal root drive and temp drive are on the same disk, then we can use hard links.
Like in the command line
fsutil hardlink create
This does not take additional disk space, it’s just a link to the file.
If they are on different drives, this is not possible – the UseHardLinks feature must be switched off – and in this case the file will be physically copied.
If you would like to use hard links, I think the configuration below should work for you.
<Sections>
<Section Name="Default">
<WorkDir>D:\ePortal\Temp</WorkDir>
<LongPath Enabled="false">
<LongPathAPI Enabled="true">
<ProxyWorkDirs DisableHardLinkRootCheck="false" DisableHardLinkDriveTypeCheck="false" Comment="Set empty root to mark the default workdir. Set empty workdir to use the system temp folder">
<WorkDir Root="" />
<WorkDir Root="C:\" UseHardLinks="true" />
<WorkDir Root="D:\" UseHardLinks="true">D:\Temp\ePortal\LongPathProxy</WorkDir>
</ProxyWorkDirs>
This will:
- For the D drive it will use D:\Temp\ePortal\LongPathProxy
- For the C drive it will use the system temp folder (because the folder is not explicitly set for C:\)
- For any other drive not explicitly specified it will use the system temp folder (because the folder is not explicitly set for Root=””)
So if you have a file longer than 250+ characters in D:\ePortal\Temp – it will make a hard link of it into D:\Temp\ePortal\LongPathProxy
Or just disable the LongPath feature.
Enter How to here:
- How to Step 1
- How to Step 2
- How to Step 3
Applies to:
Product | Version |
---|---|
ePortal |