Deny all web access to a directory? (Searched the net already...)
From: david (david_at_discussions.microsoft.com)
Date: 09/29/04
- Next message: fish: "How to read the authentication's timeout value ?"
- Previous message: DaveF: "ZIPCODE DB ACCESS TO SQL"
- Next in thread: Scott M.: "Re: Deny all web access to a directory? (Searched the net already...)"
- Reply: Scott M.: "Re: Deny all web access to a directory? (Searched the net already...)"
- Reply: Steve C. Orr [MVP, MCSD]: "Re: Deny all web access to a directory? (Searched the net already...)"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 28 Sep 2004 19:25:02 -0700
Hi,
[Note: I first posted this to the .security subgroup, but then saw that it
was almost dead, so I am reposting here. Sorry for the dup posts...]
I have a asp.net site running on an MS Access database this is, for better
or worse, stored under the webroot.
How can I lockout the database directory to prevent anyone from downloading
the mdb file via HTTP?
I have attached my web.config file at the end of this message.
The problem is that the "database" directory is still viewable by anyone.
Not sure why. No errors. IIS just lets me though. Do I have a typo
somwhere?
Thanks,
David
---------------------------------------------
<configuration>
<system.web>
<customErrors mode="Off"/>
<!-- Authentication form -->
<authentication mode="Forms">
<forms name=".ASPXAUTH" loginUrl="app-admin/Login.aspx" protection="All"
timeout="999999" path="/app-admin/" />
</authentication>
<!-- Allow anon users to main site -->
<authorization>
<allow users="?" />
</authorization>
</system.web>
<!-- Set up secure zone for app admin -->
<location path="app-admin">
<system.web>
<!-- disallow anon users to this zone-->
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
<!-- Set up secure zone for database -->
<location path="database">
<system.web>
<!-- disallow all users to this zone-->
<authorization>
<deny users="*" />
</authorization>
</system.web>
</location>
</configuration>
- Next message: fish: "How to read the authentication's timeout value ?"
- Previous message: DaveF: "ZIPCODE DB ACCESS TO SQL"
- Next in thread: Scott M.: "Re: Deny all web access to a directory? (Searched the net already...)"
- Reply: Scott M.: "Re: Deny all web access to a directory? (Searched the net already...)"
- Reply: Steve C. Orr [MVP, MCSD]: "Re: Deny all web access to a directory? (Searched the net already...)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|