Exclude Files from HttpForbiddenHandler

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Exclude Files from HttpForbiddenHandler

    Hi all,
    By default .cs files are protected from downloading by adding ".cs" to
    the HttpForbiddenHandler in machine.config.

    How to ALLOW (exclude from HttpForbiddenHandler) a specifig file
    (myfile.cs) to download ???

    TIA

    Dan Ackermann

    Dan Ackermann Guest

  2. Similar Questions and Discussions

    1. how to exclude models from light?
      in the multiuser demo (link below) i noticed on some computers, especially on macs with openGL, that the groud has sometimes effects of the...
    2. tar and --exclude
      Am running ubuntu breezy updated to 2.6.12-10-686 I was trying to backup my system following the instructions here: ...
    3. How to exclude classes?
      How to exclude classes from being compiled in run-time? I guess it can decrease time (and size) to compile an mxml file. We can do it for FlashMX...
    4. Exclude text from search
      I have a verity search in a site which also has other cold fusion coding in it, for example cfif statments. The verity search if picking up the code...
    5. how can I exclude a user from an import
      On Wed, 18 Dec 2002 21:02:55 +0100, Frederic Payant <> wrote: SYS is never exported and never imported, because any DDL will modify the SYS...
  3. #2

    Default Re: Exclude Files from HttpForbiddenHandler

    Dan,

    Add an httpHandlers section to your web.config file to map the specific
    file(s) to StaticFileHandler. e.g.:

    <httpHandlers>
    <add verb="GET" path="myfile.cs" type="System.Web.StaticFileHandler" />
    </httpHandlers>

    HTH,
    Nicole

    "Dan Ackermann" <dummy@intos.ch> wrote in message
    news:%23n9D$rQKEHA.2704@TK2MSFTNGP10.phx.gbl...
    > Hi all,
    > By default .cs files are protected from downloading by adding ".cs" to the
    > HttpForbiddenHandler in machine.config.
    >
    > How to ALLOW (exclude from HttpForbiddenHandler) a specifig file
    > (myfile.cs) to download ???
    >
    > TIA
    >
    > Dan Ackermann
    >


    Nicole Calinoiu Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139