Try our conversational search powered by Generative AI!

VirtualPathProvider - relative physicalpath


Is it possible to configure VirtualPathProviders with a relative physicalPath? Like this:

    virtualName="Page Files"
    type="EPiServer.Web.Hosting.VirtualPathVersioningProvider, EPiServer"

I have tried but I have not got it to work. 

Regards Hans

Aug 27, 2008 8:18

Hmm... it should accept any value that the constructor of the DirectoryInfo class accepts but I think it is a big unknown what the current directory is for the thread...

But you can use environmental variables since Environment.ExpandEnvironmentVariables are called.

So it would be possible to use:



Aug 29, 2008 22:58

Thanks Fredrik!

I've set upp an environmental variable to the VPP-folder. The ASPNET account has modify access to it. Still I get an "UnauthorizedAccessException" when I start my application. The exception in swedish: Åtkomst till sökvägen %KULING-VPP%\PageFiles nekas. The same exception was thrown when I tried with relative paths (..\..\).

Any idea?



Sep 02, 2008 16:49

Tried again after an IIS-reset. Now the environmental variable is recognized.

So now it works. Thanks a lot Fredrik.


Sep 03, 2008 8:14
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.