100% Australian Windows Web Hosting
  • Knowledge Base

Downloading file types blocked by ASP.NET 

Was this helpful? (0) (0)

For security, ASP.NET blocks certain file types by default. Blocked file types include common database formats such as mdb and mdf.

To allow these files types to be downloaded by the public the following can be used in a web.config file:

<configuration>
 <system.web>
  <httpHandlers>
  <remove verb="*" path="*.mdb" />
  <add verb="GET,HEAD" path="*.mdb" type="System.Web.StaticFileHandler"/>
  </httpHandlers>
 </system.web>
</configuration>

The above example is for mdb files.