Exclude Files from HttpForbiddenHandler

Discussion in 'ASP .Net Security' started by Dan Ackermann, Apr 23, 2004.

  1. 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, Apr 23, 2004
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:%23n9D$...
    > 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, Apr 30, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter
    Replies:
    2
    Views:
    5,847
    Steve C. Orr, MCSD
    Aug 20, 2003
  2. Chuck Ritzke

    Exclude Files from Copy Project?

    Chuck Ritzke, Apr 22, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    396
    Curt_C [MVP]
    Apr 22, 2004
  3. xenophon
    Replies:
    1
    Views:
    665
    Steven Cheng[MSFT]
    Nov 3, 2005
  4. Sanjay Pais
    Replies:
    1
    Views:
    2,424
    Sanjay Pais
    Dec 20, 2005
  5. VB Programmer
    Replies:
    0
    Views:
    957
    VB Programmer
    Jan 5, 2006
Loading...

Share This Page