limit web application access to local directory?

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

  1. #1

    Default limit web application access to local directory?


    I'm trying to convince a web systems administrator to install ASP.NET on
    his web server so I can host a dynamic departmental web site on it. Does
    anyone know of a straighforward writeup of what it takes (machine.config
    and NTFS file permissions) to limit an anonymous asp.net application to
    a specific directory and subdirs so he doesn't have to worry about my
    aspx pages wreaking havoc on his server? I am still studying the MS docs
    but there are so many details and permutations.

    Thanks for any help on this.

    Michael
    Michael Appelmans Guest

  2. Similar Questions and Discussions

    1. Local Storage Directory for Contribute
      Hi All, I was just wondering if someone could shead some light on where Contribute stores it's temp files on the computer when it opens a page up...
    2. Server cannot access application directory ... The directory does not exist or is not accessible because of security settings
      If you are using Windows XP in a Workgroup, rather than a Domain, then by default "Simple Filesharing" is turned on, and you won't see a security...
    3. Server cannot access application directory... The directory does not exist or is not accessible because of security settings.
      Hi, I have this issue with the error below. Let me explain my goal and my server environement: Goal: To have 3 separate web servers reading...
    4. limit directory size
      Hi, perhaps someone knows how to limit the size of a certain directory within a partition. On the certain partition disk qoutation is active for...
    5. files/directory limit?
      Is there a limit on the number of files that can be in a directory in AIX? If so, what is it? For bonus points, if anyone can point to where...
  3. #2

    Default limit web application access to local directory?

    A couple of things you can do:

    1. change the anonymous account for the web site through
    IIS, to a new one you create just for this purpose. Then
    set NTFS perms on appropriate folders.

    2. change the account under which ASP.NET runs; see
    [url]http://msdn.microsoft.com/library/default.asp?[/url]
    url=/library/en-us/dnnetsec/html/SecNetHT01.asp
    Not strictly necessary in your scenario. It defaults to
    the least prvilieged ASPNET local account anyway.

    You might also find 'food for thought' in MS patterns &
    practices book "Building Secure Microsoft ASP.NET
    Applications" at:

    [url]http://msdn.microsoft.com/library/default.asp?[/url]
    url=/library/en-us/dnnetsec/html/secnetlpMSDN.asp

    >-----Original Message-----
    >
    >I'm trying to convince a web systems administrator to
    install ASP.NET on
    >his web server so I can host a dynamic departmental web
    site on it. Does
    >anyone know of a straighforward writeup of what it takes
    (machine.config
    >and NTFS file permissions) to limit an anonymous asp.net
    application to
    >a specific directory and subdirs so he doesn't have to
    worry about my
    >aspx pages wreaking havoc on his server? I am still
    studying the MS docs
    >but there are so many details and permutations.
    >
    >Thanks for any help on this.
    >
    >Michael
    >.
    >
    richlm Guest

  4. #3

    Default Re: limit web application access to local directory?


    Thanks Rich, I found what I was looking for in that patterns book you
    suggested.

    Specifically set the trust level in the machine.config file
    <location path="sitepath" allowOverride="false">
    <trust level="low" originUrl="siteUrl" />
    </location>
    which in turn invokes
    <IPermission
    class="FileIOPermission"
    version="1"
    Read="$AppDir$"
    PathDiscovery="$AppDir$"
    />
    in the web_lowtrust.config file to limit the web applications access to
    the local dir and allowOverride= "false" prevents overidding the
    settings in the local web.config file. The low trust level also prevents
    ASP.NET from calling out to unmanaged code.

    I guess this coupled with NTFS file permissions ought to do the trick.

    Thanks again.

    Michael

    In article <028501c37fc0$c63b4f90$a401280a@phx.gbl>, [email]richlm@itcoaches.dk[/email]
    says...
    > A couple of things you can do:
    >
    > 1. change the anonymous account for the web site through
    > IIS, to a new one you create just for this purpose. Then
    > set NTFS perms on appropriate folders.
    >
    > 2. change the account under which ASP.NET runs; see
    > [url]http://msdn.microsoft.com/library/default.asp?[/url]
    > url=/library/en-us/dnnetsec/html/SecNetHT01.asp
    > Not strictly necessary in your scenario. It defaults to
    > the least prvilieged ASPNET local account anyway.
    >
    > You might also find 'food for thought' in MS patterns &
    > practices book "Building Secure Microsoft ASP.NET
    > Applications" at:
    >
    > [url]http://msdn.microsoft.com/library/default.asp?[/url]
    > url=/library/en-us/dnnetsec/html/secnetlpMSDN.asp
    >
    >
    > >-----Original Message-----
    > >
    > >I'm trying to convince a web systems administrator to
    > install ASP.NET on
    > >his web server so I can host a dynamic departmental web
    > site on it. Does
    > >anyone know of a straighforward writeup of what it takes
    > (machine.config
    > >and NTFS file permissions) to limit an anonymous asp.net
    > application to
    > >a specific directory and subdirs so he doesn't have to
    > worry about my
    > >aspx pages wreaking havoc on his server? I am still
    > studying the MS docs
    > >but there are so many details and permutations.
    > >
    > >Thanks for any help on this.
    > >
    > >Michael
    > >.
    > >
    >
    Michael Appelmans 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