Questions tagged [virtualpathprovider]

VirtualPathProvider is class which provides a set of methods that enable a Web application to retrieve resources from a virtual file system.

VirtualPathProvider is class which provides a set of methods that enable a Web application to retrieve resources from a virtual file system.

117 questions
40
votes
2 answers

Using VirtualPathProvider to load ASP.NET MVC views from DLLs

Based on this question here and using code found here I'm trying to load views that are embedded resources in a separate DLL project, and the original question's author says he has had success doing this - but I can't get it to work as it seems the…
jmcd
  • 4,269
  • 5
  • 36
  • 36
37
votes
3 answers

Using custom VirtualPathProvider to load embedded resource Partial Views

I wrote custom VirtualFile and VirtualPathProvider implementations that are successfully obtaining embedded resources that are Partial Views. However, when I attempt to render them it produces this error: The view at…
28
votes
4 answers

MEF and Razor Views inside Class Library

I have a composite ASP .NET MVC 3 Razor application using MEF. Everything goes fine if I am to deploy plugins as DLL files and views (CSHTML) under the regular Views folder from the application. But this is not very clean and it won't be a real…
24
votes
1 answer

Could not find file PrecompiledApp.config when working with precompiled Razor views and VirtualPathProviders

We have an application using WebForms .aspx files for just about everything. Latley we have been using precompiled RazorViews as a way of getting nicley packeted functionality by simply dropping a new dll in our project. But now we have discoverd…
15
votes
2 answers

ASP.NET using embedded resources in Bundling

I'm trying to implement a generic approach for providing the possibility for different assemblies in my web solution to use embedded JavaScript and CSS files from embedded resources. This blog post shows a technique using a VirtualPathProvider. This…
13
votes
1 answer

ASP.NET Bundling/Minification and Embedded Resources

I'm trying to use the technique described in this blog to add embedded dll resources to my bundles. I have created the custom VirtualPathProvider below. public class EmbeddedVirtualPathProvider : VirtualPathProvider { private Type _rootType; …
Red Taz
  • 4,159
  • 4
  • 38
  • 60
10
votes
2 answers

Cannot debug EmbeddedResource views loaded via custom VirtualPathProvider

I have written a custom VirtualPathProvider (source here) which will return content from EmbeddedResources, or from the original file if it has been told where to find it (this allows you to edit and update the files without having to rebuild). This…
8
votes
1 answer

ASP.NET VirtualPathProvider with Static Files Issue

I'm running IIS 7.5 on Windows 7. My ASP .NET application uses a VirtualPathProvider. Most of the files (aspx pages) are returned and rendered fine by my VirtualPathProvider. Static files (css/images) are not. They yield a HTTP 404 error if I try to…
Jeff
  • 35,755
  • 15
  • 108
  • 220
8
votes
2 answers

ASP.NET MVC 2 VirtualPathProvider GetFile every time for every request

I have implemented a VirtualPathProvider. The VirtualPathProvider reads the view from File system. However my problem is the method GetFile(string virtualPath) is not executed every time for every request. I think it is related to the caching, isn't…
Alex Yeung
  • 2,495
  • 7
  • 31
  • 48
8
votes
5 answers

Virtual Path Provider disable caching?

I have a virtual path provider. Problem is its caching my files. Whenever I manually edit one of the aspx files it references the VPP doesn't pull in the new file, it continues to reuse the old file until I restart the site. I've even over-rode the…
downatone
  • 1,936
  • 2
  • 23
  • 30
7
votes
1 answer

Create virtual file path from stream

I have a general question concerning C# & Windows API: My task is loading a file from a document management system (DMS) and create a byte array from this file. From the developer of the DMS I got a dll which provides a method like…
marco birchler
  • 1,566
  • 2
  • 21
  • 45
7
votes
1 answer

.NET VirtualPathProviders and Pre-Compilation

We've been working on an application that quite heavily relies on VirtualPathProviders in ASP.NET. We've just come to put the thing on a live server to demonstrate it and it appears that the VirtualPathProviders simply don't work when the site is…
Chris Roberts
  • 18,622
  • 12
  • 60
  • 67
6
votes
1 answer

ASP.NET MVC Disable view caching in overridden VirtualPathProvider

I am doing some dev work using portable areas so I have an overridden VirtualPathProvider. My public override bool FileExists(string virtualPath) seems to get called only every few minutes, meaning that MVC is caching the views. This is…
Code Silverback
  • 3,204
  • 5
  • 32
  • 39
6
votes
3 answers

Web Deployment Project: Publish without Precompilation

The Question Is it possible to publish a web application project using a web deployment project without precompilation? Notes In order to split out web controls and pages into a separate assembly, I am using a custom VirtualPathProvider to load…
brad
  • 73,826
  • 21
  • 73
  • 85
5
votes
1 answer

Configuring IIS 7 to handle static files through a Virtual Path Provider

I have a virtual path provider that serves static files from my virtual file system,is it possible to configure the IIS to server static files through my virtual path provider or do I need to create a custom static file handler?
marcus
  • 9,616
  • 9
  • 58
  • 108
1
2 3 4 5 6 7 8