Virtual / Dynamic Folder

  • Thread starter Thread starter Ben Harper
  • Start date Start date
B

Ben Harper

How can I create a virtual, or dynamic folder? I want to serve up
images on request, where the image url contains all the information
needed to display it. These images must be generated on the fly.

Thanks,
Ben
 
Hi Ben, do you mean serve items that don't exist from a directory structure
that doesn't phsically exist? If so, you need to add a wildcard map to your
application

IIS-->Application-->Properties-->Home Directory-->Configuration-->Insert
wild card application map.

The exe should be aspnet_isapi.dll and you should uncheck the 'verify that
the file exists' box.

ASP Net will now answer all requests (e.g for .htm, .gif etc.) therefore I
would advise that this becomes a child application of your main application
and only services request of this type otherwise you might find you are using
aspnet to service requests it doesn't need to.

Once you have got to this stage you then need to either server.transfer to
the actual physical object or write a custom IHttpHandler to service the
request. I have found it is quite helpful to catch requests to ".axd" so you
can still view the server traces.

HTH jd
 
Not sure what you mean. You could just stream the created image (with
System.Drawing) to the browser ?? I don't think you need any kind of folder
to do that...
 
Thanks very much. I perchance happened to stumble across those details
an hour or two ago. At least there is a correct answer now on this
thread.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top