Re: Deny access to a directory with web.config

From: Juan T. Llibre (nomailreplies_at_nowhere.com)
Date: 04/27/05

  • Next message: Matt: "Re: Deny access to a directory with web.config"
    Date: Wed, 27 Apr 2005 06:26:18 -0400
    
    

    There's a step-by-step tutorial at :

    http://www.dotnetcoders.com/web/Articles/ShowArticle.aspx?article=186

    Juan T. Llibre
    ASP.NET MVP
    http://asp.net.do/foros/
    Foros de ASP.NET en Espaņol
    Ven, y hablemos de ASP.NET...
    ======================

    "Juan T. Llibre" <nomailreplies@nowhere.com> wrote in message
    news:ejueHIxSFHA.1152@tk2msftngp13.phx.gbl...
    > web.config :
    >
    > <?xml version="1.0" encoding="utf-8" ?>
    > <configuration>
    >
    > <system.web>
    > <authorization>
    > <allow users="ASPNET's account name"/>
    > <deny users="*"/>
    > </authorization>
    >
    > </system.web>
    > </configuration>
    >
    >
    >
    >
    > Juan T. Llibre
    > ASP.NET MVP
    > http://asp.net.do/foros/
    > Foros de ASP.NET en Espaņol
    > Ven, y hablemos de ASP.NET...
    > ======================
    >
    > "Matt" <none@none.com> wrote in message
    > news:e2ju61l2vntc345gtvcbc0ukfmdeull60l@4ax.com...
    >> Good suggestion, but is there a way to control access to that
    >> directory with the web.config?
    >>
    >> Thanks.
    >>
    >>>You can move the directory outside of the web application's directory.
    >>>
    >>>-Brock
    >>>DevelopMentor
    >>>http://staff.develop.com/ballen
    >>>
    >>>
    >>>
    >>>> Hello,
    >>>> I'm working on a portal based on IBuySpy, where the main page is
    >>>> desktopdefault.aspx and all content is stored in
    >>>> www.domain.com/content/html/nnn
    >>>> or
    >>>> www.domain.com/content/images/nnn
    >>>> and injected in the desktopdefault.aspx page.
    >>>> How can I prevent users doing www.domain.com/content/images/test.jpg
    >>>> and getting the image (or the html file, or whatever inside the
    >>>> content directory?)
    >>>> It doesn't matter if the user is authenticated or not, I just want
    >>>> obly the webapplication to be able to load and display the files
    >>>> inside the /content directory.
    >>>> Can I do this just manipulating the web.config, without changing
    >>>> directory permissions on the webserver?
    >>>>
    >>>> Thanks!
    >
    >


  • Next message: Matt: "Re: Deny access to a directory with web.config"

    Relevant Pages

    • Re: WS2003 SP1 RC1 0x800B0003
      ... > Well they've released RC2, which I'm betting deals with this, considering ... >> ASP.NET MVP ... >> Foros de ASP.NET en Espaņol ...
      (microsoft.public.windowsupdate)
    • Re: Problem: Request time out
      ... Please post the code you use to store the comment. ... ASP.NET MVP ... Foros de ASP.NET en Espaņol ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: IIS6 issue with asp.net pages hosting.
      ... > ASP.NET MVP ... > Foros de ASP.NET en Espaņol ... >> Indexing service is desabled. ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: very beginner, pls help to start
      ... ASP.NET MVP ... Foros de ASP.NET en Espaņol ... > I know that I should have went through the FAQ before posting any ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: <%@ OutputCache Duration="30" VaryByParam="none" %>
      ... ASP.NET MVP ... Foros de ASP.NET en Espa?ol ... the articles tell what i thought in the first place. ... my method should not execute if the output is being cached, ...
      (microsoft.public.dotnet.framework.aspnet)