Ask a Question related to ASP.NET Security, Design and Development.
-
david #1
Deny web access to a directory?
Hi,
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
it 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. Do I have a typo?
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-->
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
<!-- Set up secure zone for database -->
<location path="database">
<system.web>
<!-- disallow all users-->
<authorization>
<deny users="*" />
</authorization>
</system.web>
</location>
</configuration>
david Guest
-
Deny access to a directory with web.config
Hello, I'm working on a portal based on IBuySpy, where the main page is desktopdefault.aspx and all content is stored in... -
How to Deny Access to Certain User?
I need to know how to deny access to a user (or role, for that matter) in Contribute 3. A client called me and they fired the worker who was in... -
Deny access to a folder
How can I deny access to a folder when authorization mode is none. I have xml files and I don't want then to be seen. When I restrict it from IIS, I... -
Deny Access to a page
I am using forms auth. against a sql db. I am using a role membership to control access to the various pages in the application. I have created a... -
how to deny access to certain volume via file sharing (OS9)?
Hi all - I have a Mac running OS9.2 at work. I connect to it from home by file sharing via TCP/IP. I want to set the permissions such that people... -
Dominick Baier #2
Deny web access to a directory?
hi,
asp.net handles only the requests that are mapped on aspnet_isapi which are asmx, aspx and some more - other extensions are directly handled by IIS without even entering your application
add another script mapping to IIS for .mdb pointing to exactly the same script handler as .aspx - you could also add a HttpForbiddenHandler to your web/machine.config after that.
---
Dominick Baier - DevelopMentor
[url]http://www.leastprivilege.com[/url]
nntp://news.microsoft.com/microsoft.public.dotnet.framework.aspnet.security/<4D921C30-E888-4D1A-871E-A4984D6456B6@microsoft.com>
Hi,
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
it 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. Do I have a typo?
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-->
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
<!-- Set up secure zone for database -->
<location path="database">
<system.web>
<!-- disallow all users-->
<authorization>
<deny users="*" />
</authorization>
</system.web>
</location>
</configuration>
[microsoft.public.dotnet.framework.aspnet.security]
Dominick Baier Guest



Reply With Quote

