Does authorization support web.config files other than aspx?

I have an ASP.NET form validation application. It works well, but I have one directory with olly.txt files (without aspx files) that I want users to not have access to (or just logged in to).

I added web.config to this directory:

<system.web>
    <authorization>
        <deny users="?" />
    </authorization>
</system.web>

EDIT:

This only works for .aspx files. It does not work for .txt files and the like. Users cannot view this directory or subdirectories, but knowing the name of the .txt file, they can access it.

I am running IIS6 and IIS 7.5. Files are also limited in IIS6.txt, but in IIS 7.5 it is not so that this could be a problem with configuring IIS.

+3
source share
3 answers

-. ASP.NET , ASP.NET. IIS 5 6, .txt .jpg,.gif pure.html, aspx, asmx ..

, IIS7 , ASP.NET . , IIS5 6, mime, aspnet.isapi, .txt.

UPDATE:

 <deny users="*"> 

. ,

<allow roles="administrators" /> 
<deny users="*"> 

, . , , .

- :

<deny users="?"> 
+7

web.config ( ASP.NET)

+3

IIS 7+, system.webServer/security/authorization http://www.iis.net/ConfigReference/system.webServer/security/authorization, . system.web seciton, , , , , system.webServer/security/authorization .

+3

All Articles