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
3
votes
1 answer

MVC embedded views

I am trying to embed views in an external dll along with the css and js for them. I am mostly there. I do an Html.RenderPartial from my main project and that seems to find the embedded view and css and js no problem (using a…
user2047485
  • 391
  • 5
  • 20
3
votes
0 answers

Breakpoints in Embedded Razor Views not being hit when using a VirtualPathProvider

I have cshtml files in a shared library project, that is then referenced by the main website project. A VirtualPathProvider is registered on startup to make it look like the views from the shared library actually exist in the main website. The…
LynchDev
  • 793
  • 1
  • 12
  • 27
3
votes
1 answer

Including a MVC View or string in a javascript bundle using Bundling framework

I'm trying to bundle several javascript files together, but I also need to include a variable from app.config in the js. My thought was to use a Controller to return a string to set the variable, so going to ~/Javascript/Index would return var foo =…
3
votes
1 answer

Is there any VirtualPathProvider working sample in mvc4 razor?

I have read dozens of related threads and made my very simple virtual provider from samples. But it does not render virtual file stream. just showing plan text. Here is the output. @inherits System.Web.Mvc.WebViewPage @{ViewBag.Title = "Hellow…
whangsy
  • 31
  • 2
  • 4
2
votes
1 answer

Vertical asp.net MVC organization and VirtualPathProviders

I'm currently working on a relatively large MVC project I would like to organize vertically. Why break convention? And, in more detail here As far as implementation goes, the plan is a VirtualPathProvider. My question is, what would the best way be…
2
votes
3 answers

VirtualPathProvider doesn't (quite) work in production on IIS 7.5

I have been working on a project that has common bits of functionality, specifically I wanted to share the master file and related images/js/etc. To that end, the master page and its dependent files are all wrapped into a "global" DLL that is…
Ryan Wersal
  • 3,210
  • 1
  • 20
  • 29
2
votes
1 answer

VirtualPathProvider won't see requests because * filetype handler not set on asp.net development server

I am using a VirtualPathProvider to serve some resources from .dll's (plugins). In IIS one can change the filetype filter for the ASP.NET ISAPI filter to '*'. How can I do the same for the ASP.NET development server that comes with Visual…
Dennis Smit
  • 1,168
  • 8
  • 12
2
votes
1 answer

Embedded resources when using virtual path provider

I have successfully created my own virtual path provider to load a user control embedded in an assembly. The problem I am facing is I cannot use any embedded string resource in MyUserControl.ascx:
2
votes
0 answers

asp.mvc 404 Error with Custom ControllerFactory and DBProvider

The app I am currently working on is an MVC3 app that combines standard view instantiation along with retrieving the view from a database if a physical view does not exist. I am running into a problem with 404 errors when implementing a custom…
AlexGad
  • 6,612
  • 5
  • 33
  • 45
2
votes
0 answers

Load views from different assemblies Using VirtualPathProvider

I use this code to load views from embedded resources. My main purpose is to load from different assemblies too. Sorry if it's duplicate but I couldn't find my answer. using SecondApp.Controllers; using System; using System.Collections; using…
unos baghaii
  • 2,539
  • 4
  • 25
  • 42
2
votes
0 answers

ASP NET MVC VirtualPathProvider avoid some paths

I wrote a VirtualPathProvider to dynamically load my MVC views, which are saved in a database. The problem is that it is taking too long to load the views because the class ViewPathProvider is getting all paths and searching for them in the…
2
votes
4 answers

Custom VirtualPathProvider not being used in IIS6

I added the following lines to Application_Start method in global.asax: var provider = new TestVirtualPathProvider(); HostingEnvironment.RegisterVirtualPathProvider(provider); Yet the 'TestVirtualPathProvider' is never used when deploying this…
Bertvan
  • 4,943
  • 5
  • 40
  • 61
2
votes
3 answers

ASP .NET MVC VirtualPathProvider

I am writing a VirtualPathProvider to dynamically load my MVC views, which are located in a different directory. I successfully intercept the call before MVC (in FileExists), but in my VirtualPathProvider, I get the raw, pre-routed url…
Jeff
  • 35,755
  • 15
  • 108
  • 220
2
votes
3 answers

Asp.net MVC VirtualPathProvider views parse error

I am working on a plugin system for Asp.net MVC 2. I have a dll containing controllers and views as embedded resources. I scan the plugin dlls for controller using StructureMap and I then can pull them out and instantiate them when requested. This…
madcapnmckay
  • 15,782
  • 6
  • 61
  • 78
2
votes
1 answer

SiteMap.CurrentNode returns null when using query parameter

I have written a custom ASP.NET sitemap provider, it works well but if I add a query parameter to a virtual path SiteMap.CurrentNode returns null - it does not find the page. I've put breakpoints in all my code and never once does it enter my…
user152949