Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
I had the same question a while back, and used Reflector on the class. If I recall correctly, the config parameters were stored in a NameValueCollection and then used for precisely nothing at all.
I may (likely) have missed something, though...
I came across the VirtualPathPageMappingProvider when I did an upgrade from EPiServer 4 to 5, I don't know if it's related but here's some info about it...
In version 4 I had an "upload" virtual path which was used for page files and global uploads. As part of the upgrade I separated the page files into their own folder with their own virtual path (/pages/). This creates a problem because all the links in content still point at /upload/ for page files. So you need to add:
<unifiedFileSystem>
<mappings>
<map fromPath="/upload" toPath="/pages" type="EPiServer.FileSystem.Mapping.PageDirectoryMapping,EPiServer" />
More info here: http://world.episerver.com/en/Documentation/Items/Tech-Notes/EPiServer-CMS-5/EPiServer-CMS-5-R2/EPiServer-CMS-Migration-Tool-11/#Prerequisites
Then during the upgrade that mapping gets converted to something like this:
<add toPath="~/pages/" fromPath="~/upload/" name="Mapping0" type="EPiServer.Web.Hosting.VirtualPathPageMappingProvider,EPiServer.Legacy4" />
So the VirtualPahPageMappingProvider is mapping requests for the path /upload/ to path /pages/, it should be last in the list of providers in the configuration if you have another provider handling the /upload/ path.
I do not quite get the VirtualPathMappedProvider.
Here's one example of how to use it that I've found:
<providers>
<add showInFileManager="false"
virtualName="AdminMapping"
virtualPath="~/your/relative/path/to/ui/admin/AdminGroup.aspx"
bypassAccessCheck="false"
name="AdminMapping"
type="EPiServer.Web.Hosting.VirtualPathMappedProvider,EPiServer" />
</providers>
<virtualPathMappings>
<add url="~/your/relative/path/to/ui/admin/AdminGroup.aspx"
mappedUrl="~/customadmin/AdminGroup.aspx" />
</virtualPathMappings>
But when I try it out myself the only thing necessary to get it to work seems to be:
<providers>
<add name="CustomEditUrlMapping"
type="EPiServer.Web.Hosting.VirtualPathMappedProvider,EPiServer" />
</providers>
Then I can add:
<virtualPathMappings>
<add url="~/epi/edit/workspace.aspx"
mappedUrl="~/CommonCode/Plugin/CustomWorkspace.aspx" />
<add url="~/epi/edit/XFormEdit.aspx"
mappedUrl="~/epiCustom/edit/XFormEdit.aspx" />
</virtualPathMappings>
and whatever other mappings I want and all seems to work out just fine.
So why do I find virtualPath and the other parameters in the examples of how to use VirtualPathMappedProvider?
What do virtualPath do and is it necessary?
Best regards Stefan