I solved the problem, I used the App_Data directory to read all the resources, that is not allowed for the VirtualPathProvider, see here, in particular in the Remarks paragraph:
You cannot store ASP.NET application folders or files that generate application-level assemblies in a virtual file system. This includes:
- The Global.asax file
- Web.config files
- Site map data files used by the XmlSiteMapProvider
- Directories that contain application assemblies or that generate application assemblies: Bin, App_Code, App_GlobalResources, any App_LocalResources
- The application data folder, App_Data