locked
Adding httpHandlers to my web.config to restrict all files within a folder RRS feed

  • Question

  • User468878487 posted

    Hi,

    I have an httpHandler which restrict access to files only to authenticated users.

    I have a folder called protected which contains all my files.

    In my web.config i have the line <add verb="*" path="*/protected/*" validate="true" type="FileProtectionHandler"/>

    It works fine except when i put files in sub folders within the protected folder.  I need it to execute the handler for all files within my protected folder, no matter if the file is in subfolders or not.

    What am i doing wrong?

    Friday, October 2, 2009 6:43 AM

Answers

  • User-1659704165 posted

    Hi,

    Create HttpHandler and Keep looking for Request of file..

    http://www.c-sharpcorner.com/UploadFile/shivprasadk/1234612222008053711AM/12346.aspx?ArticleID=ed1b18d1-da24-46b9-a61d-07750fc856a7

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, October 2, 2009 8:45 AM