views:

301

answers:

1

I try to use HttpForbiddenHandler to block the file without success. The web.config is as follows:

<httpHandlers>
<add verb="*" path="*.ashx" type="Castle.MonoRail.Framework.MonoRailHttpHandlerFactory, Castle.MonoRail.Framework"/>
<add verb="*" path="*.vm" type="System.Web.HttpForbiddenHandler"/>
</httpHandlers>

I have setup the virtual directory to forward .vm request to aspnet_isapi.dll too. Basically I have followed this guide: http://support.microsoft.com/kb/815152

Any idea why it doesn't work? I am using Windows XP + IIS 5.1 to test it.

Update: Further diagnostic test pushing me to hell. I try to delete .config binding in ISAPI list, as expected the file is served. The I add everything back, and this time, instead of showing 'File type not served', it shows me 'No http handler was found for request type 'GET' ! I am completely pissed off, is that just IIS 5.1 for XP or I did something fishy?No I just scared myself on this- when I troubleshoot I tried to remove all httpHandlers using . But the .vm not being blocked issue still exist.

+2  A: 

Ignore this one. Page cache hurts.

goodwill
Haha. Yeah, but thanks, you just saved me a lot of time by pointing that out.
Triynko