Try our conversational search powered by Generative AI!

VirtualPathProvider and GetProvider method

Vote:
 

In version 9 the VirtualPathProvider class has been removed. I need to use the GetProvider method to get the physical path for a VirtualPathNonUnifiedProvider. How would I do that in Episerver 9?

Thanks

Frederik

#143619
Jan 27, 2016 20:32
Vote:
 

You can get an instance of EPiServer.Web.Hosting.VirtualPathRegistrationHandler from IOC container. That has a dictionary property RegisteredVirtualPathProviders that gives you access to all virtual path providers registered through episerver API together with their configuration.

#143703
Jan 29, 2016 8:45
Vote:
 

Haha, that was easy enough. Thanks Johan!

#143768
Jan 29, 2016 20:17
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.