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 the开发者_C百科re 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.
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.
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.
精彩评论