Wednesday, March 28, 2012

VitualPathProvider not initialising - giving directory listing?

Hi,

I am working with the virtualpathprovider for delivering content on a site I am working on and it works fine if I call a specific page however when I fire up a browser to visit the test site all I get is a directory listing (when testing with cassini) or a directory listing denied message with IIS.

As far as I can tell the VirtualPathProvider isn't getting initialised.

As a cheat I have added a default.aspx file to the root of the site working on the basis that it's presence would be enough to trigger the .net app to initialise and then the VPP would do it's stuff - this seems to work fine when testing on Cassini however when I test it on an IIS staging server all I seem to be able to get from the app is the default.aspx cheat file - trying to browse to other pages keeps on bringing it up.

I have seen references to this issue elsewhere in this section and was wondering if anyone has come across the problem and found a workaround?

Cheers,

JulianOK, I have been doing a bit more digging and it seem that when I debug my app against an IIS6 server it works as expected, but when compiled and run from an IIS6 server it doesn't work because it appears that the VirtualPathProvider isn't getting registered.

Has anyone here managed to get the VPP to work in a production environment?

0 comments:

Post a Comment