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

1.8k views Asked by At

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?

1

There are 1 answers

7
dove On

If I read correctly say you wanted to handle static files with the extesion pac, that is MyFile.pac from your virtual site.

Open IIS7 and go to your virtual site, in the features view double click MIME Types, then click Add.. and put in your extension and an appropriate MIME type, such as "text/plain".

This is a IIS way of doing it but like you say it could be done with a custom static file handler.

(this is assuming your static files have an extension that are not being dealt with already, as many are)