Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Allow MDB Downloads in IIS7

Currently if I am hosting an Access .MDB file to allow users to download, IIS7 is throwing a 404 error. I know the file is there and the permissions are fine. It appears to be a Handler issue, but I cannot figure out how to change the handler to allow downloading of MDB file. I assume I need to add something to the Handlers section of the web.config, but I am unsure of the syntax.

Thanks.

like image 824
Bryan Lewis Avatar asked Jan 14 '10 19:01

Bryan Lewis


2 Answers

Or, if you don't want to modify a system-wide configuration file, you could add the following lines to that section in your web.config:

<remove fileExtension=".mdb" />
<add fileExtension=".mdb" allowed="true"/>

For example your Web.config should be similar to this:

<configuration>
  <system.webServer>
    <security>
      <requestFiltering>
        <fileExtensions allowUnlisted="true" >
          <remove fileExtension=".mdb" />
          <add fileExtension=".mdb" allowed="true"/>
        </fileExtensions>
     </requestFiltering>
   </security>
 </system.webServer>
</configuration>

Also see http://www.adamwlewis.com/articles/iis-7-not-serving-files-4047-error.

like image 154
Yorick Sijsling Avatar answered Nov 11 '22 06:11

Yorick Sijsling


OK, found it.

Just need to remove the following line:

<add fileExtension=".mdb" allowed="false" />

in the "requestFiltering" section from the \Windows\System32\inetserv\config\applicationHost.config file.

like image 30
Bryan Lewis Avatar answered Nov 11 '22 08:11

Bryan Lewis