The problem is that ASP.NET runtime do not involved (by default) when serving static content, like files from your folder...
If the runtime not involved, than no-one will check what written in the web.config file...
You have several options:
1. Map relevant file types to the ASP.NET engine
2. Write custom handler to server (r deny in your case) those files
3. Use the integrated pipeline in IIS 7 to make all requests invoke ASP.NET runtime...
Understanding IIS 7.0 URL Authorization : The Official Microsoft IIS Site[
^]