Im uploading a file with help of UnifiedDirectory in Episerver 7.1. The file is saved perfectly when browsed within episerver VPP file explorer. For instance the path could become something like:
Path: XformFiles/xformdata/2015_04_24/file.jpg
If i rightclick the file and select edit i can view and edit the file so this works.
But when i open the file in vpp folder open file "editmode" i get 404.
Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Requested URL http://somesite.no:80/XformFiles/134017_1184046626_m.jpg
Physical Path C:\something\Main\Site.Web\XformFiles\XformFiles\xformdata134017_1184046626_m.jpg
Logon Method Forms
And it tries to get:
C:\something\Main\Site.Web\XformFiles\XformFiles\xformdata134017_1184046626_m.jpg
It should be something more like this (we use an network basePath for the VPP folder):
\\172.40.1.163\vpp\Epi7_new\XformFiles\xformdata134017_1184046626_m.jpg
NOTE: If EPiServer tried to get the file this way above it would most likley work.
EPiServerFramework.config:
<add showInFileManager="true" virtualName="XformFiles"
virtualPath="~/XformFiles/" bypassAccessCheck="true"
physicalPath="\\172.40.1.163\vpp\Epi7_new\XformFiles"
name="XformFiles" type="EPiServer.Web.Hosting.VirtualPathNativeProvider,EPiServer" />
For documents folder we use this (the appDataPath is \\172.40.1.163\vpp\Epi7_new\ )
<add showInFileManager="true" virtualName="Documents" virtualPath="~/Documents/"
bypassAccessCheck="false" maxVersions="5" useRouting="true"
customFileSummary="~/FileSummary.config" physicalPath="[appDataPath]\SiteDocuments"
name="SiteDocuments" type="EPiServer.Web.Hosting.VirtualPathVersioningProvider, EPiServer" />
<appData basePath="\\172.40.1.163\Epi7_new" />
The solution to this was to add useRouting="true" in Virtual Path Configuration here: