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
1
vote
1 answer

Manipulating Directories and Images with Medium Trust .NET 2.0

This question: Creating directories in medium trust environment? Is kind of the same, but the answer didn't really help. On my website, I have a bunch of product images held within a master directory entitled "Products2" within that are various…
Jamie Hartnoll
  • 7,231
  • 13
  • 58
  • 97
1
vote
1 answer

Is there such a thing as a writable VirtualPathProvider?

I'm looking at using VirtualPathProviders to abstract away the accessing of files on the filesystem so that this could be easily swapped out to work with other services such as Amazon S3. Whilst this works really well for reading files, I was…
Matt Brailsford
  • 2,209
  • 3
  • 28
  • 40
0
votes
2 answers

Maintaining cache control property on a file when it is returned as Stream from VirtualPathProvider

I have implemented a VirtualPathProvider to return Theme files (images,css) for an Azure web site from the Azure CDN. It is working fine apart from one thing: the files that are coming from the CDN all have their cache control property set to…
Mad Pierre
  • 440
  • 2
  • 11
0
votes
1 answer

VirtualPathProvider Not Working on Hosting Environment

My .Net project works fine on Local IIS7 (Windows 7 IIS7 x86). But it does not work on hosting environment (W2008 Server x64 IIS7). I can fully control hosting environment. But I could not locate the error. When working locally I can access the USer…
HGMamaci
  • 1,339
  • 12
  • 20
0
votes
1 answer

VirtualPathProvider problem with content pages

I have a VirtualPathProvider that works fine with asp.net pages. It compiles in runtime and run everything well. But, when I try to open a page that contains asp:Content tags, I always getting: Only Content controls are allowed directly in a…
0
votes
1 answer

Load ASP.NET MVC views and controllers code from database

I have a system in which the end-user is a developer who can create ASP.NET MVC views/controllers and run them on the fly. Currently, I have two database tables, one to store the view name and code and other to store controller code in C#. I can…
0
votes
1 answer

Load views from a cloud service using a virtual path provider?

Is it possible to use a virtual path provider to load views from a cloud service? For example if I have a site admin ui located under http://www.example.com/ui, I want to load the views from the cloud.
marcus
  • 9,616
  • 9
  • 58
  • 108
0
votes
1 answer

asp.net VirtualPathProvider - no longer recognising physical files

I'm using VirtualPathProvider to return virtual pages from a database table and it's all working fine but the problem is that the site no longer recognises when a page exists physically rather than being held in the virtual pages table. The code…
Steve
  • 35
  • 5
0
votes
0 answers

VirtualPathProvider - disabling caching hangs server (IIS and Cassini)

I have a Virtual Path Provider on a Web site. It does exactly what I want it to do with the simple exception that it hangs the server. This usually only happens if too many requests come in at the roughly the same time. When I remove the caching…
jbecker
  • 39
  • 4
0
votes
0 answers

Virtual Path Provider with embedded resource Asp.Net MVC as class library

I have a requirement of seperating whole mvc structure into class libraries. But after seperation Virtual path provider must be implemented for getting the views from dll as embedded resources. I have multiple dll from which i need to get the path.…
0
votes
1 answer

Resolve Tenant Id in VirtualPathProvider MVC5

I am writing multitenant based application and I want to load custom view from storage base on url(tenant). I type https://corporate.myapp.local/ in browser but in FileExistsmethod HttpContext.Current.Request.Url give me http://127.0.0.1/ it does…
SOF User
  • 7,590
  • 22
  • 75
  • 121
0
votes
1 answer

How can I get MVC 5 to render a View that is physically outside the Web Application Folder?

I am using ASP.NET MVC5 and I would like to render a view from a folder that is outside the application folder. I tried registering my own custom the VirtualPathProvider and I even created my own VirtualPathProviderViewEngine to support rendering…
0
votes
1 answer

ASP.Net, How to ignore the MasterPage does not exist error?

I am working on my CMS project based on ASP.Net MVC2, I have implemented my VirtualPathProvider and VirtualFile for my master page, to use a master page in db. It works as below: I indicate the MasterPageFile in the aspx/ascx file. <%@ Page…
Jerry
  • 13
  • 4
0
votes
0 answers

How to edit or Is it possible to edit views from database and replace them with custom labels or text boxes based on condition?

I have been following this article for rendering view from database and then using VirtualPathProvider class to register the route. My main requirement is such that i want to render the same view, based on condition, so that it will open once in…
0
votes
2 answers

ASP.NET MVC, Custom VirtualPathProvider and IIS6

I have implemented my own VirtualPathProvider for loading 'embedded' views. This works very well when running from Visual Studio, but I get the 'The view not found' message when running on IIS6. Is there anything missing in web.config, or could…
Bertvan
  • 4,943
  • 5
  • 40
  • 61