web.config to allow access to files


hello techies,

i have web hosting in ms windows server 2008. figured out needed add <directorybrowse ...> line web.config, doesn't allow visitors download files want. so, researching further, tried using <location path..> use <allow users ="*" />, doesn't seem work either.  all seem ability browse directory.  so, want able allow browsing & download access files in particular folder & subfolders.

any help? 

and way, did try using <system.webserver>  instead of  <system.web> location path section.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <system.webserver>
        <staticcontent>
       <mimemap fileextension=".bsp" mimetype="application/octet-stream" />
       <mimemap fileextension=".wad" mimetype="application/octet-stream" />
       <mimemap fileextension=".mdl" mimetype="application/octet-stream" />
       <mimemap fileextension=".spr" mimetype="application/x-sprite" />
       <mimemap fileextension=".wav" mimetype="audio/wav" />
       <mimemap fileextension=".mp3" mimetype="audio/mp3" />
  </staticcontent>
        <defaultdocument enabled="true">
            <files>
                <clear />
                <add value="index.aspx" />
                <add value="index.asp" />
                <add value="index.htm" />
                <add value="index.html" />
                <add value="home.aspx" />
                <add value="home.asp" />
                <add value="home.htm" />
                <add value="home.html" />
                <add value="default.aspx" />
                <add value="default.asp" />
                <add value="default.htm" />
                <add value="default.html" />
            </files>
        </defaultdocument>
        <directorybrowse enabled="true" />
        <security>
            <authentication>
                <basicauthentication enabled="true" />
            </authentication>
        </security>
    </system.webserver>
<!--this section gives unauthenicated user access files in svdownload folder. -->
 <location path="svdownload">
 <system.web>
  <authorization>
   <allow users ="*" />
  </authorization>
 </system.web>
 </location>
</configuration>

 

might ask them here.

http://forums.iis.net/

 

 

 


regards, dave patrick ....
microsoft certified professional
microsoft mvp [windows]


Windows Server  >  File Services and Storage



Comments

Popular posts from this blog

Motherboard replacement

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state

Remote Desktop App - Error 0x207 or 0x607