1

I can do this just fine under Apache with htaccess / permissions. But at work its all M$ all the time...

I need to lock off access to any .fla files that might come up. We keep them next to the few .swf we use on some of our sites, I just want to be sure they are not being served.

Thanks!

EDIT

I should point out that I didn't think I needed to mention what code is running on this particular site, but it seems that I have to, as I have ASP classic code, which will not allow me to read a web.config file, it will just ignore it.

EDIT... EDIT

Really... nobody knows how I can do this?

Jakub
  • 380
  • 1
  • 11

2 Answers2

1

I believe you need to create a handler, and map it to the System.Web.HttpForbiddenHandler in the web.config.

e.g. MDB files aren't served up by default:

<add path="*.mdb" verb="*" type="System.Web.HttpForbiddenHandler" validate="true"/>

edit: I think you may also need to add it as a MIME type as described in Home Boy's post.

mpeterson
  • 255
  • 1
  • 11
  • see also: http://stackoverflow.com/questions/1053696/how-do-i-restrict-access-to-files-with-specific-extensions-in-asp-net for a pretty detailed explanation. – mpeterson Dec 16 '09 at 18:59
  • I can't seem to get this to work for ASP classic 1.1... Am I doing something wrong? I create a web.config file, toss the `` + `` in there, and nothing happens. – Jakub Dec 16 '09 at 21:51
  • There is a web.config here as well: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config Assuming your Default Web Site (or whatever you are using) is configured as an 'Application' in IIS, you can add the MIME type there, and then add the handler to the web.config specified above. – mpeterson Dec 17 '09 at 05:16
  • @mpeterson, I will try that, and let you know tomorrow (IIS restart at night) as it is a production system. – Jakub Dec 17 '09 at 21:03
0

Check the MIME extensions, Im hoping .fla is not one of those default supported content types.

Home Boy
  • 62
  • 4
  • I checked, there was no FLA in the MIME list, however it allows the download. Don't know if this is the route to do this then. – Jakub Dec 16 '09 at 21:49