VirtualPathProvider and GetProvider method

Frederik Vig
Member since: 2008
 

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
Johan Björnfot
Member since: 2004
 

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
Frederik Vig
Member since: 2008
 

Haha, that was easy enough. Thanks Johan!

#143768
Jan 29, 2016 20:17
This topic is created over 6 months ago and already resolved. If you have similar question please create new topic and refer to this one.